From 9520a82d425eae0fecf1cb60d5120ed537e1a862 Mon Sep 17 00:00:00 2001 From: Liny Date: Mon, 18 Jun 2012 18:02:19 -0700 Subject: [PATCH] Dont crash if there is no setting for saving the current state of a statbar item in, just go with the defaults. Sanity check that will make sure RelwithDebInfo wont break if/when LL 3.3.3 is merged in. --- indra/llui/llstatbar.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 3a5e85e81d..7395fbb182 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -54,7 +54,12 @@ LLStatBar::LLStatBar(const Params& p) mDisplayMean(p.show_mean), mSetting(p.setting) { - S32 setting = LLUI::sSettingGroups["config"]->getS32(mSetting); + //S32 setting = LLUI::sSettingGroups["config"]->getS32(mSetting); // dont crash if there is no setting for saving the current state of the item in, just go with the defaults + S32 setting = -1; + if(mSetting != "") + { + setting = LLUI::sSettingGroups["config"]->getS32(mSetting); + } switch (setting) { default: