Skip to content

Commit 5ff70a9

Browse files
author
Rye
committed
Fix possible leak of gesture when region ptr is null
1 parent 1fb34c3 commit 5ff70a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

indra/newview/llpreviewgesture.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,9 @@ void LLPreviewGesture::saveIfNeeded()
10961096
if (!region)
10971097
{
10981098
LL_WARNS() << "Not connected to a region, cannot save gesture." << LL_ENDL;
1099+
// we're done with this gesture
1100+
delete gesture;
1101+
gesture = NULL;
10991102
return;
11001103
}
11011104
std::string agent_url = region->getCapability("UpdateGestureAgentInventory");

0 commit comments

Comments
 (0)