MAINT-6699 FIXED [VOB] Crash in LLSnapshotLivePreview::getBigThumbnailImage()

master
Mnikolenko Productengine 2016-09-07 17:26:07 +03:00
parent 464d70c546
commit 1de6e0830c
2 changed files with 15 additions and 4 deletions

View File

@ -1235,14 +1235,14 @@ S32 LLFloaterSnapshot::notify(const LLSD& info)
return 0;
}
void LLFloaterSnapshotBase::ImplBase::updateLivePreview()
BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
{
LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook");
LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance<LLFloaterFlickr>("flickr");
LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance<LLFloaterTwitter>("twitter");
if (!mFloater && !floater_facebook && !floater_flickr && !floater_twitter)
return;
if (!initialized && !floater_facebook && !floater_flickr && !floater_twitter)
return FALSE;
BOOL changed = FALSE;
LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL;
@ -1251,8 +1251,13 @@ void LLFloaterSnapshotBase::ImplBase::updateLivePreview()
{
changed |= LLSnapshotLivePreview::onIdle(*iter);
}
return changed;
}
if (mFloater && changed)
void LLFloaterSnapshotBase::ImplBase::updateLivePreview()
{
if (ImplBase::updatePreviewList(true) && mFloater)
{
LL_DEBUGS() << "changed" << LL_ENDL;
updateControls(mFloater);
@ -1267,6 +1272,10 @@ void LLFloaterSnapshot::update()
{
inst->impl->updateLivePreview();
}
else
{
ImplBase::updatePreviewList(false);
}
}
// static

View File

@ -116,6 +116,8 @@ public:
virtual EStatus getStatus() const { return mStatus; }
virtual void setNeedRefresh(bool need);
static BOOL updatePreviewList(bool initialized);
void setAdvanced(bool advanced) { mAdvanced = advanced; }
virtual LLSnapshotModel::ESnapshotLayerType getLayerType(LLFloaterSnapshotBase* floater) = 0;