From 88b53a26ce633bfc07f9990e9dc1e9c85dd31414 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 7 Mar 2019 20:26:15 +0200 Subject: SL-10635 Better handlling for unexpected situations --- indra/newview/llsettingspicker.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llsettingspicker.cpp') 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(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(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); -- cgit v1.2.3