summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-07-18 18:14:22 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-07-18 18:49:43 +0300
commit951ce0ad36e4bf2066c48941c00203463d3fe41d (patch)
tree966283b9e0b9f510bd607e43be6a9798f680b62a
parentace506cc8aec370b739b40ab2afa7c1fef4cc030 (diff)
viewer#2061 Crash in ~LLScriptEdCore()
-rw-r--r--indra/newview/llpreviewscript.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index c2188ea638..b7c929f0b5 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -414,7 +414,13 @@ LLScriptEdCore::~LLScriptEdCore()
if (script_search && script_search->getEditorCore() == this)
{
script_search->closeFloater();
- delete script_search;
+ // closeFloater can delete instance since it's not reusable nor single instance
+ // so make sure instance is still there before deleting
+ script_search = LLFloaterScriptSearch::getInstance();
+ if (script_search)
+ {
+ delete script_search;
+ }
}
delete mLiveFile;