Crash prevention, don't dereference possible 0-pointer.

Nicky 2013-11-12 10:58:30 +01:00
parent fceb3af0e6
commit 86905e89e9
1 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
: mIgnore(IGNORE_NO),
mInvertSetting(false) // ignore settings by default mean true=show, false=ignore
{
if (p.ignore.isProvided())
if (p.ignore.isProvided() && LLUI::sSettingGroups["ignores"] && LLUI::sSettingGroups["config"])
{
mIgnoreMsg = p.ignore.text;
@ -428,7 +428,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mShowToast(p.show_toast),
mSoundName("")
{
if (p.sound.isProvided()
if (p.sound.isProvided() && LLUI::sSettingGroups["config"]
&& LLUI::sSettingGroups["config"]->controlExists(p.sound))
{
mSoundName = p.sound;