diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-10-16 11:52:43 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-10-16 11:52:43 -0400 |
commit | 1f8b37e9ad65f8064b83adac295d9eb162976e4c (patch) | |
tree | 3ced849ad5750b7884d291e17e89fec419e03382 /indra/newview/llfavoritesbar.cpp | |
parent | 2331b9a93b12eb0a2f5fb6109f990d81b29d0584 (diff) | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) |
merge
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rwxr-xr-x | indra/newview/llfavoritesbar.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index b35ef3a961..a2d0759587 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -552,6 +552,10 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con bool insert_before = true; if (!mItems.empty()) { + // [MAINT-2386] When multiple landmarks are selected and dragged onto an empty favorites bar, + // the viewer would crash when casting mLastTab below, as mLastTab is still null when the + // second landmark is being added. + // To ensure mLastTab is valid, we need to call updateButtons() at the end of this function dest = dynamic_cast<LLFavoriteLandmarkButton*>(mLandingTab); if (!dest) { @@ -623,6 +627,11 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con cb); } + // [MAINT-2386] Ensure the favorite button has been created and is valid. + // This also ensures that mLastTab will be valid when dropping multiple + // landmarks to an empty favorites bar. + updateButtons(); + llinfos << "Copied inventory item #" << item->getUUID() << " to favorites." << llendl; } |