diff options
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 2d57c16889..5d90af0cfe 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1172,6 +1172,14 @@ void move_inventory_item( void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id) { + if (NULL == src) + { + LL_WARNS("copy_inventory_from_notecard") << "Null pointer to item was passed for object_id " + << object_id << " and notecard_inv_id " + << notecard_inv_id << LL_ENDL; + return; + } + LLViewerRegion* viewer_region = NULL; LLViewerObject* vo = NULL; if (object_id.notNull() && (vo = gObjectList.findObject(object_id)) != NULL) @@ -1194,6 +1202,16 @@ void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecar return; } + // check capability to prevent a crash while LL_ERRS in LLCapabilityListener::capListener. See EXT-8459. + std::string url = viewer_region->getCapability("CopyInventoryFromNotecard"); + if (url.empty()) + { + LL_WARNS("copy_inventory_from_notecard") << "There is no 'CopyInventoryFromNotecard' capability" + << " for region: " << viewer_region->getName() + << LL_ENDL; + return; + } + LLSD request, body; body["notecard-id"] = notecard_inv_id; body["object-id"] = object_id; |