summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-04-25 21:15:49 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-04-25 23:01:01 +0300
commit69a81d641abb7427d22a4bfd6014b696476dd8b7 (patch)
treee87e579b3de22ef845b6ccfcfefe32c7cf332dd3
parent8665cd3750767cf47246d1b89b8a668bc4dd4138 (diff)
#3982 Crash at getChild<LLScrollListCtrl>
Notification about inventory change from fetchInventoryFromCapCoro Looks like floater was closed a moment before receiving inventoryChanged
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp16
-rw-r--r--indra/newview/llfloaterbulkpermission.h7
2 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index c09c02d32b..74c5079268 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -89,9 +89,17 @@ bool LLFloaterBulkPermission::postBuild()
{
mBulkChangeNextOwnerTransfer = true;
}
+
+ mQueueOutputList = getChild<LLScrollListCtrl>("queue output");
return true;
}
+void LLFloaterBulkPermission::onClose(bool app_quitting)
+{
+ removeVOInventoryListener();
+ LLFloater::onClose(app_quitting);
+}
+
void LLFloaterBulkPermission::doApply()
{
// Inspects a stream of selected object contents and adds modifiable ones to the given array.
@@ -216,7 +224,7 @@ void LLFloaterBulkPermission::onCommitCopy()
bool LLFloaterBulkPermission::start()
{
// note: number of top-level objects to modify is mObjectIDs.size().
- getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("start_text"));
+ mQueueOutputList->setCommentText(getString("start_text"));
return nextObject();
}
@@ -239,7 +247,7 @@ bool LLFloaterBulkPermission::nextObject()
if(isDone() && !mDone)
{
- getChild<LLScrollListCtrl>("queue output")->setCommentText(getString("done_text"));
+ mQueueOutputList->setCommentText(getString("done_text"));
mDone = true;
}
return successful_start;
@@ -294,8 +302,6 @@ void LLFloaterBulkPermission::doCheckUncheckAll(bool check)
void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv)
{
- LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
@@ -362,7 +368,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve
status_text.setArg("[STATUS]", "");
}
- list->setCommentText(status_text.getString());
+ mQueueOutputList->setCommentText(status_text.getString());
//TODO if we are an object inside an object we should check a recuse flag and if set
//open the inventory of the object and recurse - Michelle2 Zenovka
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 23ca45b611..0b61022e0c 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -41,7 +41,8 @@ class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener
friend class LLFloaterReg;
public:
- bool postBuild();
+ bool postBuild() override;
+ void onClose(bool app_quitting) override;
private:
@@ -57,7 +58,7 @@ private:
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
- void* queue);
+ void* queue) override;
// This is called by inventoryChanged
void handleInventory(LLViewerObject* viewer_obj,
@@ -85,7 +86,7 @@ private:
private:
// UI
- LLScrollListCtrl* mMessages;
+ LLScrollListCtrl* mQueueOutputList = nullptr;
LLButton* mCloseBtn;
// Object Queue