From 614865edae734d8f8c4ad6b22eee928ec0f08d61 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Tue, 24 Nov 2009 17:38:15 +0200 Subject: fixed major bug (EXT-2748) Crash on exit from viewer without log in When a focused control is being destroyed, focus gets passed to the login panel, that leads to crash if the panel has been destroyed already. Made the focus manager reset keyboard focus in this case. Found unreachable code in llstartup.cpp! --HG-- branch : product-engine --- indra/newview/llpanellogin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 78f3469f0e..ec0f8e303c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -391,6 +391,10 @@ LLPanelLogin::~LLPanelLogin() //// We know we're done with the image, so be rid of it. //gTextureList.deleteImage( mLogoImage ); + + // Controls having keyboard focus by default + // must reset it on destroy. (EXT-2748) + gFocusMgr.setDefaultKeyboardFocus(NULL); } // virtual @@ -682,8 +686,6 @@ void LLPanelLogin::closePanel() if (sInstance) { gViewerWindow->getRootView()->removeChild( LLPanelLogin::sInstance ); - - gFocusMgr.setDefaultKeyboardFocus(NULL); delete sInstance; sInstance = NULL; -- cgit v1.2.3