diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 47201b2ccc83916e80c3986eff29fc53de9c859f..7168c33ce2e6fd38851c232ddcfca9f487047a1b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -328,22 +328,26 @@ void LLInventoryPanel::modelChanged(U32 mask)
 				// around in the panel's directory structure (i.e. reparented).
 				if (model_item && view_item)
 				{
-					LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
-
-					// Item has been moved.
-					if (view_item->getParentFolder() != new_parent)
+					// Don't process the item if it's hanging from the root, since its
+					// model_item's parent will be NULL.
+					if (view_item->getRoot() != view_item->getParent())
 					{
-						if (new_parent != NULL)
-						{
-							// Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
-							view_item->getParentFolder()->extractItem(view_item);
-							view_item->addToFolder(new_parent, mFolders);
-						}
-						else 
+						LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
+						// Item has been moved.
+						if (view_item->getParentFolder() != new_parent)
 						{
-							// Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that 
-							// doesn't include trash).  Just remove the item's UI.
-							view_item->destroyView();
+							if (new_parent != NULL)
+							{
+								// Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
+								view_item->getParentFolder()->extractItem(view_item);
+								view_item->addToFolder(new_parent, mFolders);
+							}
+							else 
+							{
+								// Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that 
+								// doesn't include trash).  Just remove the item's UI.
+								view_item->destroyView();
+							}
 						}
 					}
 				}