From b496e4ff156ab2fb055e741b97ceda5751476e7f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 10 Aug 2016 16:32:35 +0300 Subject: MAINT-6616 new crash in VOB viewer in snapshot preview --- indra/newview/llfloateroutfitsnapshot.cpp | 9 ++++++++- indra/newview/llfloateroutfitsnapshot.h | 1 + indra/newview/llfloatersnapshot.cpp | 8 +++++++- indra/newview/llfloatersnapshot.h | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutfitsnapshot.cpp b/indra/newview/llfloateroutfitsnapshot.cpp index 093a2dad64..ca5a2fdad5 100644 --- a/indra/newview/llfloateroutfitsnapshot.cpp +++ b/indra/newview/llfloateroutfitsnapshot.cpp @@ -311,13 +311,20 @@ void LLFloaterOutfitSnapshot::onOpen(const LLSD& key) // static void LLFloaterOutfitSnapshot::update() { - LLFloaterOutfitSnapshot* inst = getInstance(); + LLFloaterOutfitSnapshot* inst = findInstance(); if (inst != NULL) { inst->impl->updateLivePreview(); } } + +// static +LLFloaterOutfitSnapshot* LLFloaterOutfitSnapshot::findInstance() +{ + return LLFloaterReg::findTypedInstance("outfit_snapshot"); +} + // static LLFloaterOutfitSnapshot* LLFloaterOutfitSnapshot::getInstance() { diff --git a/indra/newview/llfloateroutfitsnapshot.h b/indra/newview/llfloateroutfitsnapshot.h index 482080da7a..04623acf0f 100644 --- a/indra/newview/llfloateroutfitsnapshot.h +++ b/indra/newview/llfloateroutfitsnapshot.h @@ -51,6 +51,7 @@ public: static void update(); static LLFloaterOutfitSnapshot* getInstance(); + static LLFloaterOutfitSnapshot* findInstance(); /*virtual*/ void saveTexture(); const LLRect& getThumbnailPlaceholderRect() { return mThumbnailPlaceholder->getRect(); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index a0e54e47b6..48c44b88fc 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1255,13 +1255,19 @@ void LLFloaterSnapshotBase::ImplBase::updateLivePreview() //static void LLFloaterSnapshot::update() { - LLFloaterSnapshot* inst = getInstance(); + LLFloaterSnapshot* inst = findInstance(); if (inst != NULL) { inst->impl->updateLivePreview(); } } +// static +LLFloaterSnapshot* LLFloaterSnapshot::findInstance() +{ + return LLFloaterReg::findTypedInstance("snapshot"); +} + // static LLFloaterSnapshot* LLFloaterSnapshot::getInstance() { diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 4c65c8d06a..44c6415326 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -146,6 +146,7 @@ public: static void update(); static LLFloaterSnapshot* getInstance(); + static LLFloaterSnapshot* findInstance(); /*virtual*/ void saveTexture(); BOOL saveLocal(); static void setAgentEmail(const std::string& email); -- cgit v1.2.3