PHOE-3494: Don't allow device settings before login, causes crash

Tue, 06 Mar 2012 18:24:10 -0800

author
Kadah_Coba <kadah.coba@gmail.com>
date
Tue, 06 Mar 2012 18:24:10 -0800
changeset 1664
f9cd471c38bf
parent 1663
351a8540fccc
child 1665
35bd4c2173eb

PHOE-3494: Don't allow device settings before login, causes crash

indra/newview/llprefsvoice.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llprefsvoice.cpp	Tue Mar 06 18:11:28 2012 -0800
     1.2 +++ b/indra/newview/llprefsvoice.cpp	Tue Mar 06 18:24:10 2012 -0800
     1.3 @@ -42,6 +42,7 @@
     1.4  #include "llmodaldialog.h"
     1.5  #include "llviewercontrol.h"
     1.6  #include "lluictrlfactory.h"
     1.7 +#include "llstartup.h"
     1.8  
     1.9  
    1.10  class LLVoiceSetKeyDialog : public LLModalDialog
    1.11 @@ -187,7 +188,10 @@
    1.12  	self->childSetEnabled("set_voice_middlemouse_button", enable);
    1.13  
    1.14      // PHOE-3836: Don't allow device settings unless voice is actually enabled, otherwise may cause crash (KC)
    1.15 -	bool voice_enable = !gSavedSettings.getBOOL("CmdLineDisableVoice") && gSavedSettings.getBOOL("EnableVoiceChat");
    1.16 +    // PHOE-3494: Don't allow device settings before login, causes crash (KC)
    1.17 +	bool voice_enable = !gSavedSettings.getBOOL("CmdLineDisableVoice")
    1.18 +                        && gSavedSettings.getBOOL("EnableVoiceChat")
    1.19 +                        && LLStartUp::getStartupState() == STATE_STARTED;
    1.20  	self->childSetEnabled("device_settings_btn", voice_enable);
    1.21  }
    1.22  

mercurial