diff options
author | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-04-16 23:45:35 +0000 |
commit | b01c75cb423f07a3d3354f8bd62f265f80062b3b (patch) | |
tree | dec1b220c24a60cc220d1cb07fd3545610644f0a /indra/newview/llfloatersnapshot.cpp | |
parent | 868250bdd74f348557102c0d8408d9bec30331f6 (diff) |
svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1
QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index e3b95e4058..d45d9c052f 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1275,7 +1275,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) LLSnapshotLivePreview* previewp = getPreviewView(floater); BOOL got_bytes = previewp && previewp->getDataSize() > 0; - BOOL got_snap = previewp->getSnapshotUpToDate(); + BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); @@ -1283,7 +1283,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) LLLocale locale(LLLocale::USER_LOCALE); std::string bytes_string; - LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + if (got_snap) + { + LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + } S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); floater->childSetLabelArg("texture", "[AMOUNT]", llformat("%d",upload_cost)); floater->childSetLabelArg("upload_btn", "[AMOUNT]", llformat("%d",upload_cost)); |