From 44b8fa43033eda21aaa8aa2014958effc233e044 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 20 May 2026 23:14:53 +0300 Subject: #5845 Crash in LLFloaterInspect on shutdown --- indra/newview/llfloaterinspect.cpp | 21 ++++++++++++--------- indra/newview/llmanipscale.cpp | 6 ++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 163edf0426..77a98943ac 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -78,18 +78,21 @@ LLFloaterInspect::~LLFloaterInspect(void) { mCreatorNameCacheConnection.disconnect(); } - if(!LLFloaterReg::instanceVisible("build")) + if (!LLApp::isExiting()) { - if(LLToolMgr::getInstance()->getBaseTool() == LLToolCompInspect::getInstance()) + if (!LLFloaterReg::instanceVisible("build")) { - LLToolMgr::getInstance()->clearTransientTool(); + if (LLToolMgr::getInstance()->getBaseTool() == LLToolCompInspect::getInstance()) + { + LLToolMgr::getInstance()->clearTransientTool(); + } + // Switch back to basic toolset + LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + } + else + { + LLFloaterReg::showInstance("build", LLSD(), true); } - // Switch back to basic toolset - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - } - else - { - LLFloaterReg::showInstance("build", LLSD(), true); } } diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 66420d1cad..87b79fd18c 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1309,6 +1309,12 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) LLVector3 grid_scale; LLQuaternion grid_rotation; LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale); + LLViewerCamera* camera = LLViewerCamera::getInstance(); + if (!camera) + { + // can be null on shutdown + return; + } bool uniform = LLManipScale::getUniform(); -- cgit v1.3