From 7eeaee631d45fc5f85f1f45ee00d91b201b442a7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 8 Oct 2018 16:59:57 +0100 Subject: [PATCH] avoid a null ref --- .../Handlers/FetchInventory/FetchInvDescHandler.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 2a25d9c991..ff28c0f757 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs @@ -110,7 +110,9 @@ namespace OpenSim.Capabilities.Handlers List invcollSet = Fetch(folders, bad_folders, ref total_folders, ref total_items); //m_log.DebugFormat("[XXX]: Got {0} folders from a request of {1}", invcollSet.Count, folders.Count); - int invcollSetCount = invcollSet.Count; + int invcollSetCount = 0; + if (invcollSet != null) + invcollSetCount = invcollSet.Count; int mem = 8192 + ((256 * invcollSetCount + 384 * total_folders +