diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 1aece22a48e04a35af6f0bf0808d4f2f80f4be96..f41e924946e47ccb62f57c72cefdc082b040764c 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -334,6 +334,23 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
             return;
         }
 
+        if (!LLWorld::instanceExists())
+        {
+            LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL;
+            return;
+        }
+
+        regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
+        if (!regionp) //region was removed
+        {
+            LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL;
+            return; // this error condition is not recoverable.
+        }
+
+        impl = regionp->getRegionImplNC();
+
+        ++(impl->mSeedCapAttempts);
+
         if (!result.isMap() || result.has("error"))
         {
             LL_WARNS("AppInit", "Capabilities") << "Malformed response" << LL_ENDL;
@@ -353,23 +370,6 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
         // remove the http_result from the llsd
         result.erase("http_result");
 
-        if (!LLWorld::instanceExists())
-        {
-            LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL;
-            return;
-        }
-
-        regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
-        if (!regionp) //region was removed
-        {
-            LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL;
-            return; // this error condition is not recoverable.
-        }
-
-        impl = regionp->getRegionImplNC();
-
-        ++(impl->mSeedCapAttempts);
-
         if (id != impl->mHttpResponderID) // region is no longer referring to this request
         {
             LL_WARNS("AppInit", "Capabilities") << "Received results for a stale capabilities request!" << LL_ENDL;