diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-06-21 11:08:31 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-06-21 11:08:31 +0300 |
commit | ca816088999d130b2f36a287b1d33d02cea6ce30 (patch) | |
tree | 0d7022ffe7622608ce16aee10258dfb87390d283 /indra | |
parent | c7f0cabc0eb530efdbbc0bf74bf33979be23e6fa (diff) |
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
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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<LLViewerInventoryItem> 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<LLViewerInventoryItem> item = new LLViewerInventoryItem; S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); for(S32 i = 0; i < num_blocks; ++i) { |