diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index b5f1b967df7e71b826f260958977a5c3ec23b3dc..895e16adef7d17dddee08adde2f1cb9f307eabd4 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -212,10 +212,13 @@ void LLFloaterMediaSettings::commitFields()
 //static 
 void LLFloaterMediaSettings::clearValues( bool editable)
 {
-	// clean up all panels before updating
-	sInstance->mPanelMediaSettingsGeneral	 ->clearValues(sInstance->mPanelMediaSettingsGeneral,  editable);
-	sInstance->mPanelMediaSettingsSecurity	 ->clearValues(sInstance->mPanelMediaSettingsSecurity,	editable);
-	sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions,  editable);	
+	if (sInstance)
+	{
+		// clean up all panels before updating
+		sInstance->mPanelMediaSettingsGeneral	 ->clearValues(sInstance->mPanelMediaSettingsGeneral,  editable);
+		sInstance->mPanelMediaSettingsSecurity	 ->clearValues(sInstance->mPanelMediaSettingsSecurity,	editable);
+		sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions,  editable);
+	}
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 1008b4a6e4c3830534d8304c90cb56def84fb9dd..bd5b5f4eb0c38174fb2e5a10223a2045611f359f 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -529,7 +529,7 @@ void LLFloaterTools::refresh()
 	mPanelLandInfo->refresh();
 
 	// Refresh the advanced weights floater
-	LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance<LLFloaterObjectWeights>("object_weights");
+	LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::findTypedInstance<LLFloaterObjectWeights>("object_weights");
 	if(object_weights_floater && object_weights_floater->getVisible())
 	{
 		object_weights_floater->refresh();
@@ -1409,9 +1409,7 @@ bool LLFloaterTools::deleteMediaConfirm(const LLSD& notification, const LLSD& re
 //
 void LLFloaterTools::clearMediaSettings()
 {
-	LLFloaterMediaSettings::getInstance();
 	LLFloaterMediaSettings::clearValues(false);
-
 }
 
 //////////////////////////////////////////////////////////////////////////////