summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 64ec8f0b2f..930d6fa5f2 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -2555,7 +2555,13 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
{
lldebugs << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << llendl;
- if(mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY)
+ if (NULL==obj)
+ {
+ llwarns << "obj is NULL; aborting func with ACCEPT_NO" << llendl;
+ return ACCEPT_NO;
+ }
+
+ if (mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY)
{
return ACCEPT_NO;
}
@@ -2571,17 +2577,17 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
gInventory.collectDescendentsIf(cat->getUUID(),
- cats,
- items,
- LLInventoryModel::EXCLUDE_TRASH,
- droppable);
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ droppable);
cats.put(cat);
if(droppable.countNoCopy() > 0)
{
llwarns << "*** Need to confirm this step" << llendl;
}
LLViewerObject* root_object = obj;
- if (obj && obj->getParent())
+ if (obj->getParent())
{
LLViewerObject* parent_obj = (LLViewerObject*)obj->getParent();
if (!parent_obj->isAvatar())