From 0a60806f8973c05b68cf65a5a01c41d81ff2da7b Mon Sep 17 00:00:00 2001 From: Soap Frenzy <12368561+soapyf@users.noreply.github.com> Date: Sat, 19 Sep 2026 10:25:25 -0400 Subject: #6320 Fix crash when containing object is destroyed during inventory rename When an in-world object is destroyed (via llDie, temp expiration, or deletion) while an item inside its Contents tab is being renamed, the viewer crashes with an Access Violation (0xC0000005) during LLMortician teardown. --- indra/newview/llpanelobjectinventory.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5f5c8302fe..33231e8405 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1349,6 +1349,14 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par // Destroys the object LLPanelObjectInventory::~LLPanelObjectInventory() { + if (mFolders) + { + mFolders->cancelRenaming(); + if (LLEditMenuHandler::gEditMenuHandler == mFolders) + { + LLEditMenuHandler::gEditMenuHandler = NULL; + } + } if (!gIdleCallbacks.deleteFunction(idle, this)) { LL_WARNS() << "LLPanelObjectInventory::~LLPanelObjectInventory() failed to delete callback" << LL_ENDL; @@ -1398,6 +1406,15 @@ void LLPanelObjectInventory::clearContents() clearItemIDs(); + if (mFolders) + { + mFolders->cancelRenaming(); + if (LLEditMenuHandler::gEditMenuHandler == mFolders) + { + LLEditMenuHandler::gEditMenuHandler = NULL; + } + } + if( mScroller ) { // removes mFolders @@ -1780,6 +1797,14 @@ void LLPanelObjectInventory::draw() void LLPanelObjectInventory::deleteAllChildren() { + if (mFolders) + { + mFolders->cancelRenaming(); + if (LLEditMenuHandler::gEditMenuHandler == mFolders) + { + LLEditMenuHandler::gEditMenuHandler = NULL; + } + } mScroller = NULL; mFolders = NULL; LLView::deleteAllChildren(); -- cgit v1.3