From 5ff70a9dbc5791975a333a973d734f998de7aa3b Mon Sep 17 00:00:00 2001 From: Rye Date: Sun, 3 Nov 2024 16:08:27 -0500 Subject: Fix possible leak of gesture when region ptr is null --- indra/newview/llpreviewgesture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 66dcd2f7ba..ee5188b2bb 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -1096,6 +1096,9 @@ void LLPreviewGesture::saveIfNeeded() if (!region) { LL_WARNS() << "Not connected to a region, cannot save gesture." << LL_ENDL; + // we're done with this gesture + delete gesture; + gesture = NULL; return; } std::string agent_url = region->getCapability("UpdateGestureAgentInventory"); -- cgit v1.2.3