FIRE-32893 - fix crash on image upload, make sure to grab the checkbox pointer even when there is no alpha channel at all
parent
ab64614bbc
commit
1ac600f383
|
|
@ -186,6 +186,8 @@ BOOL LLFloaterImagePreview::postBuild()
|
|||
getChild<LLUICtrl>("uploaded_size_text")->setTextArg("[X_RES]", llformat("%d", mRawImagep->getWidth()));
|
||||
getChild<LLUICtrl>("uploaded_size_text")->setTextArg("[Y_RES]", llformat("%d", mRawImagep->getHeight()));
|
||||
|
||||
mEmptyAlphaCheck = getChild<LLCheckBoxCtrl>("strip_alpha_check");
|
||||
|
||||
if (mRawImagep->getComponents() != 4)
|
||||
{
|
||||
getChild<LLUICtrl>("image_alpha_warning")->setVisible(false);
|
||||
|
|
@ -205,8 +207,6 @@ BOOL LLFloaterImagePreview::postBuild()
|
|||
}
|
||||
}
|
||||
|
||||
mEmptyAlphaCheck = getChild<LLCheckBoxCtrl>("strip_alpha_check");
|
||||
|
||||
if (emptyAlphaCount > (imageBytes / 4 * ALPHA_EMPTY_THRESHOLD_RATIO))
|
||||
{
|
||||
getChild<LLUICtrl>("image_alpha_warning")->setVisible(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue