diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 3597d70e0d70efcc2a77579e670c3b01edd06d23..5fa44419140d08618424432013aa68f25f3d3d3f 100755
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -196,8 +196,10 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
 			mLoadingScreenLoaded = true;
             std::string url(getString("real_url"));
 
+            LLHandle<LLFloater> handle = getHandle();
+
             LLCoros::instance().launch("LLFloaterTOS::testSiteIsAliveCoro",
-                boost::bind(&LLFloaterTOS::testSiteIsAliveCoro, url));
+                boost::bind(&LLFloaterTOS::testSiteIsAliveCoro, handle, url));
 		}
 		else if(mRealNavigateBegun)
 		{
@@ -209,7 +211,7 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
 	}
 }
 
-void LLFloaterTOS::testSiteIsAliveCoro(std::string url)
+void LLFloaterTOS::testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string url)
 {
     LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
@@ -228,13 +230,19 @@ void LLFloaterTOS::testSiteIsAliveCoro(std::string url)
     LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
     LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
 
-    LLFloaterTOS *that = LLFloaterReg::findTypedInstance<LLFloaterTOS>("message_tos");
-    // double not.  
+    if (handle.isDead())
+    {
+        LL_WARNS("testSiteIsAliveCoro") << "Dialog canceled before response." << LL_ENDL;
+        return;
+    }
+
+    LLFloaterTOS *that = dynamic_cast<LLFloaterTOS *>(handle.get());
+    
     if (that)
         that->setSiteIsAlive(static_cast<bool>(status)); 
     else
     {
-        LL_WARNS("testSiteIsAliveCoro") << "Dialog canceled before response." << LL_ENDL;
+        LL_WARNS("testSiteIsAliveCoro") << "Handle was not a TOS floater." << LL_ENDL;
     }
 }
 
diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h
index b71b80ed24f66be7d94a40593706b6f48e04cfae..e70c9f24afce8b9edb1a5c559b37694af3597a87 100755
--- a/indra/newview/llfloatertos.h
+++ b/indra/newview/llfloatertos.h
@@ -62,7 +62,7 @@ class LLFloaterTOS :
 	/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
 
 private:
-    static void testSiteIsAliveCoro(std::string url);
+    static void testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string url);
 
 	std::string		mMessage;
 	bool			mLoadingScreenLoaded;