Skip to content

Commit 25e6834

Browse files
committed
Fix null outfit gallery observer pointer
1 parent a31b7ae commit 25e6834

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

indra/newview/lloutfitgallery.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,12 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
793793
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
794794
if (!cat) return;
795795

796+
if (mOutfitsObserver == NULL)
797+
{
798+
mOutfitsObserver = new LLInventoryCategoriesObserver();
799+
gInventory.addObserver(mOutfitsObserver);
800+
}
801+
796802
if (!isOutfitFolder(cat))
797803
{
798804
// Assume a subfolder that contains or will contain outfits, track it
@@ -820,12 +826,6 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
820826
if (!outfit_category)
821827
return;
822828

823-
if (mOutfitsObserver == NULL)
824-
{
825-
mOutfitsObserver = new LLInventoryCategoriesObserver();
826-
gInventory.addObserver(mOutfitsObserver);
827-
}
828-
829829
// Start observing changes in "My Outfits" category.
830830
mOutfitsObserver->addCategory(cat_id,
831831
boost::bind(&LLOutfitGallery::refreshOutfit, this, cat_id), true);

0 commit comments

Comments
 (0)