summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermediasettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermediasettings.cpp')
-rw-r--r--indra/newview/llfloatermediasettings.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index b5f1b967df..4f2a6ec1b7 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);
+ }
}
////////////////////////////////////////////////////////////////////////////////
@@ -309,3 +312,9 @@ bool LLFloaterMediaSettings::haveValuesChanged() const
return values_changed;
}
+bool LLFloaterMediaSettings::instanceExists()
+{
+ return LLFloaterReg::findTypedInstance<LLFloaterMediaSettings>("media_settings");
+}
+
+