From d27e5a2676273306c2d6c59d26fd5ea7900f6fbc Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 14 Mar 2011 15:44:58 +0100 Subject: [PATCH] Inventory crashfix --- indra/newview/llviewerobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9964eea6f..6a754665c 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2778,11 +2778,11 @@ LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& ass for( ; it != end; ++it) { LLInventoryObject* obj = *it; - if(obj->getType() != LLAssetType::AT_CATEGORY) + if (obj && obj->getType() != LLAssetType::AT_CATEGORY && obj->getType() != LLAssetType::AT_NONE) { // *FIX: gank-ass down cast! item = (LLViewerInventoryItem*)obj; - if(item->getAssetUUID() == asset_id) + if (item && item->getAssetUUID() == asset_id) { rv = item; break;