summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2025-05-22 08:14:41 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2025-05-22 08:14:41 -0400
commit25e68341272549905298cfd9ae122cb27ae72102 (patch)
tree5d06c86e514a0a591a10692fb3394cc17260fd95
parenta31b7ae2419b4f644ddf559274f650e34212338e (diff)
Fix null outfit gallery observer pointer
-rw-r--r--indra/newview/lloutfitgallery.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index b84b0b3a8c..9d05276db4 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -793,6 +793,12 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
if (!cat) return;
+ if (mOutfitsObserver == NULL)
+ {
+ mOutfitsObserver = new LLInventoryCategoriesObserver();
+ gInventory.addObserver(mOutfitsObserver);
+ }
+
if (!isOutfitFolder(cat))
{
// Assume a subfolder that contains or will contain outfits, track it
@@ -820,12 +826,6 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
if (!outfit_category)
return;
- if (mOutfitsObserver == NULL)
- {
- mOutfitsObserver = new LLInventoryCategoriesObserver();
- gInventory.addObserver(mOutfitsObserver);
- }
-
// Start observing changes in "My Outfits" category.
mOutfitsObserver->addCategory(cat_id,
boost::bind(&LLOutfitGallery::refreshOutfit, this, cat_id), true);