summaryrefslogtreecommitdiff
path: root/indra/newview/llgesturemgr.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-04-07 11:11:39 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-04-07 11:11:39 +0300
commit7e0e58c55f7ff24df1a452e796b22f028b14dbd9 (patch)
treeffa66349d85f03fb94bfca4920402abb1d5d56f2 /indra/newview/llgesturemgr.cpp
parent14971778682405598a587922b97c1be46738eef7 (diff)
SL-17092 Fix a gesture upload crash
Diffstat (limited to 'indra/newview/llgesturemgr.cpp')
-rw-r--r--indra/newview/llgesturemgr.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index bd881f8e7a..489d34edca 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -483,8 +483,13 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges
mActive[base_item_id] = new_gesture;
- delete old_gesture;
- old_gesture = NULL;
+ // replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id)
+ // replaces ids without repalcing gesture
+ if (old_gesture != new_gesture)
+ {
+ delete old_gesture;
+ old_gesture = NULL;
+ }
if (asset_id.notNull())
{
@@ -1107,7 +1112,7 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid,
else
{
LLMultiGesture* old_gesture = (*it).second;
- if (old_gesture)
+ if (old_gesture && old_gesture != gesture)
{
LL_DEBUGS("GestureMgr") << "Received dupplicate " << item_id << " callback" << LL_ENDL;
// In case somebody managest to activate, deactivate and