From 04f95e78e38a682d4933ead0403e78507cbe79a6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 18 Jul 2024 18:14:22 +0300 Subject: viewer#2061 Crash in ~LLScriptEdCore() --- indra/newview/llpreviewscript.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpreviewscript.cpp') 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; -- cgit v1.2.3