From a1f910939293648152bab2b4e6c35de62e95c13a Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Wed, 11 Jul 2012 14:54:20 +0200 Subject: [PATCH] Don't try to HTTP inventory fetch when we can't --- indra/newview/llinventorymodelbackgroundfetch.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 74bb12058..5e855e144 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -184,10 +184,17 @@ void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *) //static void LLInventoryModelBackgroundFetch::backgroundFetch() { + LLViewerRegion* region = gAgent.getRegion(); + if (!region) + { + return; + } + if (mBackgroundFetchActive && gAgent.getRegion()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - if (gSavedSettings.getBOOL("UseHTTPInventory")) + std::string url = region->getCapability("FetchInventory2"); + if (gSavedSettings.getBOOL("UseHTTPInventory") && !url.empty()) { bulkFetch(); return;