summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingspicker.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-03-07 20:26:15 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-03-07 20:26:15 +0200
commit88b53a26ce633bfc07f9990e9dc1e9c85dd31414 (patch)
tree3393dfc7748fc1b0eb2b61a3ddb817be2ac7bdc1 /indra/newview/llsettingspicker.cpp
parentf488e5855a310d0db55baac758da5c2f8621d2ee (diff)
SL-10635 Better handlling for unexpected situations
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);