From ea32129f493712fd8d03d8c3454f78f89f268e61 Mon Sep 17 00:00:00 2001 From: Andrew Productengine Date: Wed, 27 Oct 2010 19:23:52 +0300 Subject: STORM-452 FIXED Made protective fix for crash in LLAgentCamera::resetView(). I managed to reprodcuce the crash once and couldn't reproduce it any time later, so this fix is made judging from line that I found (viewer was in debug mode when it happened) in call stack after crash. Added check for gMenuHolder against NULL to prevent further crashing. There is no 100% guarantee that this fixes the crash from ticket, but it won't do any harm either. --- indra/newview/llagentcamera.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llagentcamera.cpp') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 68e408d3e4..7c953cd2dc 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -296,8 +296,11 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera) LLSelectMgr::getInstance()->deselectAll(); } - // Hide all popup menus - gMenuHolder->hideMenus(); + if (gMenuHolder != NULL) + { + // Hide all popup menus + gMenuHolder->hideMenus(); + } } if (change_camera && !gSavedSettings.getBOOL("FreezeTime")) -- cgit v1.2.3