diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-08-10 16:32:35 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-08-10 16:32:35 +0300 |
commit | b496e4ff156ab2fb055e741b97ceda5751476e7f (patch) | |
tree | 53cc87269eb2981735e2f954d590f289b6e5ada4 | |
parent | 471ff40c2c544158158abebcd88070c3c6aaf4c8 (diff) |
MAINT-6616 new crash in VOB viewer in snapshot preview
-rw-r--r-- | indra/newview/llfloateroutfitsnapshot.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfloateroutfitsnapshot.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llfloatersnapshot.h | 1 |
4 files changed, 17 insertions, 2 deletions
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<LLFloaterOutfitSnapshot>("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,7 +1255,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLivePreview() //static void LLFloaterSnapshot::update() { - LLFloaterSnapshot* inst = getInstance(); + LLFloaterSnapshot* inst = findInstance(); if (inst != NULL) { inst->impl->updateLivePreview(); @@ -1263,6 +1263,12 @@ void LLFloaterSnapshot::update() } // static +LLFloaterSnapshot* LLFloaterSnapshot::findInstance() +{ + return LLFloaterReg::findTypedInstance<LLFloaterSnapshot>("snapshot"); +} + +// static LLFloaterSnapshot* LLFloaterSnapshot::getInstance() { return LLFloaterReg::getTypedInstance<LLFloaterSnapshot>("snapshot"); 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); |