summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRye <rye@lindenlab.com>2024-11-03 16:08:27 -0500
committerRye <rye@lindenlab.com>2024-11-04 04:15:06 -0500
commit5ff70a9dbc5791975a333a973d734f998de7aa3b (patch)
tree270f46e0acea9fa876360d759e5eb4a2bc79321b
parent1fb34c370f1ac25794aee31443f9077cc8c0d22c (diff)
Fix possible leak of gesture when region ptr is null
-rw-r--r--indra/newview/llpreviewgesture.cpp3
1 files changed, 3 insertions, 0 deletions
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");