summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingspicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsettingspicker.cpp')
-rw-r--r--indra/newview/llsettingspicker.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index fcc615db6e..b47821ddf2 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -151,6 +151,8 @@ void LLFloaterSettingsPicker::onClose(bool app_quitting)
{
owner->setFocus(TRUE);
}
+ mSettingItemID.setNull();
+ mInventoryPanel->getRootFolder()->clearSelection();
}
void LLFloaterSettingsPicker::setValue(const LLSD& value)
@@ -302,8 +304,19 @@ void LLFloaterSettingsPicker::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr
LLComboBox* track_selection = getChild<LLComboBox>(CMB_TRACK_SELECTION);
track_selection->clear();
track_selection->removeall();
+ if (!settings)
+ {
+ LL_WARNS() << "Failed to load asset " << asset_id << LL_ENDL;
+ return;
+ }
LLSettingsDay::ptr_t pday = std::dynamic_pointer_cast<LLSettingsDay>(settings);
+ if (!pday)
+ {
+ LL_WARNS() << "Wrong asset type received by id " << asset_id << LL_ENDL;
+ return;
+ }
+
if (mTrackMode == TRACK_WATER)
{
track_selection->add(getString(STR_TRACK_WATER), LLSD::Integer(LLSettingsDay::TRACK_WATER), ADD_TOP, true);