summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfavoritesbar.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 4e0c838454..c48b809114 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -544,12 +544,16 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
// Identify the button hovered and the side to drop
- LLFavoriteLandmarkButton* dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
- bool insert_before = true;
- if (!dest)
+ LLFavoriteLandmarkButton* dest = NULL;
+ bool insert_before = true;
+ if (!mItems.empty())
{
- insert_before = false;
- dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
+ dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab);
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLastTab);
+ }
}
// There is no need to handle if an item was dragged onto itself