summaryrefslogtreecommitdiff
path: root/indra/llui/llbutton.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-03 19:11:06 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-03 19:25:19 +0300
commitd4123ec30d9a5daa96b28f2b8a3cc36ccd7e9cb1 (patch)
treeddbaeb2e54ec30877a306eb7b355a787a56b3d32 /indra/llui/llbutton.cpp
parent51f904e4a7d7e5d04be09991f859bd1b26f0d7ae (diff)
parent2465470817957c8378e81ec1a7e32551fbac7b26 (diff)
Merge branch 'main' into DRTVWR-587-maint-V
# Conflicts: # indra/newview/llinventorymodel.cpp # indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/llui/llbutton.cpp')
-rw-r--r--indra/llui/llbutton.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 3354cb2db3..49d275997a 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -203,7 +203,8 @@ LLButton::LLButton(const LLButton::Params& p)
}
// Hack to make sure there is space for at least one character
- if (getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" ")))
+ if (getRect().mRight >= 0 && getRect().getWidth() > 0 &&
+ getRect().getWidth() - (mRightHPad + mLeftHPad) < mGLFont->getWidth(std::string(" ")))
{
// Use old defaults
mLeftHPad = llbutton_orig_h_pad;