From ca816088999d130b2f36a287b1d33d02cea6ce30 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 21 Jun 2010 11:08:31 +0300 Subject: EXT-7921 FIXED Added a check whether message is what we expecting in LLInventoryAddItemByAssetObserver::changed. Reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/618/ --HG-- branch : product-engine --- indra/newview/llinventoryobserver.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 0ac8fbcb15..8cb263d9a7 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -523,8 +523,14 @@ void LLInventoryAddItemByAssetObserver::changed(U32 mask) return; } - LLPointer item = new LLViewerInventoryItem; LLMessageSystem* msg = gMessageSystem; + if (!(msg->getMessageName() && (0 == strcmp(msg->getMessageName(), "UpdateCreateInventoryItem")))) + { + // this is not our message + return; // to prevent a crash. EXT-7921; + } + + LLPointer item = new LLViewerInventoryItem; S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); for(S32 i = 0; i < num_blocks; ++i) { -- cgit v1.2.3