From 92decff3d41ccd9b517a453da7b42fff2fca268f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 29 Oct 2013 20:06:43 -0700 Subject: SH-4585 FIX: Viewer crashes after attempt to login with invalid SOCKS 5 proxy. don't have 2 login panels at the same time --- indra/newview/llpanellogin.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 707f43660c..e2b4d098e9 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -111,16 +111,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, setBackgroundVisible(FALSE); setBackgroundOpaque(TRUE); - // instance management - if (LLPanelLogin::sInstance) - { - LL_WARNS("AppInit") << "Duplicate instance of login view deleted" << LL_ENDL; - // Don't leave bad pointer in gFocusMgr - gFocusMgr.setDefaultKeyboardFocus(NULL); - - delete LLPanelLogin::sInstance; - } - mPasswordModified = FALSE; LLPanelLogin::sInstance = this; @@ -442,6 +432,16 @@ void LLPanelLogin::show(const LLRect &rect, void (*callback)(S32 option, void* user_data), void* callback_data) { + // instance management + if (LLPanelLogin::sInstance) + { + LL_WARNS("AppInit") << "Duplicate instance of login view deleted" << LL_ENDL; + // Don't leave bad pointer in gFocusMgr + gFocusMgr.setDefaultKeyboardFocus(NULL); + + delete LLPanelLogin::sInstance; + } + new LLPanelLogin(rect, callback, callback_data); if( !gFocusMgr.getKeyboardFocus() ) -- cgit v1.2.3