diff options
author | Rye <rye@lindenlab.com> | 2024-11-03 16:08:27 -0500 |
---|---|---|
committer | Rye <rye@lindenlab.com> | 2024-11-04 04:15:06 -0500 |
commit | 5ff70a9dbc5791975a333a973d734f998de7aa3b (patch) | |
tree | 270f46e0acea9fa876360d759e5eb4a2bc79321b | |
parent | 1fb34c370f1ac25794aee31443f9077cc8c0d22c (diff) |
Fix possible leak of gesture when region ptr is null
-rw-r--r-- | indra/newview/llpreviewgesture.cpp | 3 |
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"); |