summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-05-02 21:24:47 +0000
committerDon Kjer <don@lindenlab.com>2007-05-02 21:24:47 +0000
commit1c909afe3998778e4cc045c9ab733e8afbf7c25b (patch)
tree75c00a32a8e305280cbec253195d1113d628fc3e /indra/newview/lltooldraganddrop.cpp
parentbc59c04653bf1404e8148a8169208b146a123b28 (diff)
svn merge -r 60342:61148 svn+ssh://svn/svn/linden/branches/maintenance into release
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())