summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshot.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-07-24 21:35:32 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-07-27 20:29:35 +0300
commitf71fbab66aac13bddd069bdaa0d31156b691911d (patch)
treeb738de5c4ae92f2ec155514e7a5c2473846e46a0 /indra/newview/llpanelsnapshot.cpp
parentc1320260251b469b9e794c700d2c37b883c60771 (diff)
#6040 Minor warnings fixes #2
Diffstat (limited to 'indra/newview/llpanelsnapshot.cpp')
-rw-r--r--indra/newview/llpanelsnapshot.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index 56c0294dbe..d76f19617f 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -64,7 +64,12 @@ bool LLPanelSnapshot::postBuild()
{
S32 w = getTypedPreviewWidth();
S32 h = getTypedPreviewHeight();
- getChild<LLUICtrl>("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost(w, h)));
+ LLUICtrl *save_btn = findChild<LLUICtrl>("save_btn");
+ if (save_btn)
+ {
+ // Not all snapshot floaters have a save button
+ save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost(w, h)));
+ }
getChild<LLUICtrl>(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
if (!getWidthSpinnerName().empty())
{
@@ -193,7 +198,11 @@ void LLPanelSnapshot::updateImageQualityLevel()
quality_lvl = LLTrans::getString("snapshot_quality_very_high");
}
- getChild<LLTextBox>("image_quality_level")->setTextArg("[QLVL]", quality_lvl);
+ LLTextBox* quality_lvl_ctrl = getChild<LLTextBox>("image_quality_level");
+ if (quality_lvl_ctrl)
+ {
+ quality_lvl_ctrl->setTextArg("[QLVL]", quality_lvl);
+ }
}
void LLPanelSnapshot::goBack()