From d6e22a75791e6e82b1b4f4dad045e5b53129fe8d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 8 Dec 2009 10:03:34 +0200 Subject: Fixed major bug EXT-3191 (Crash after dragging inventory item to avatar or IM floater) Reason: Null pointer to cargo data was passed from LLToolDragAndDrop::dragOrDrop in this case. Fix: added check against NULL of the LLToolDragAndDrop::locateInventory() result in the LLToolDragAndDrop::dragOrDrop(). The same checking presents in another place of the LLToolDragAndDrop::dragOrDrop(). Handling is interrupted in this case. Thanks Andrew ProductEngine for provided call stack --HG-- branch : product-engine --- indra/newview/lltooldraganddrop.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 2d0a14dc70..aa35f22930 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -772,6 +772,9 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, { LLInventoryObject* cargo = locateInventory(item, cat); + // fix for EXT-3191 + if (NULL == cargo) return; + EAcceptance item_acceptance = ACCEPT_NO; handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, mCargoTypes[mCurItemIndex], -- cgit v1.2.3