diff options
| author | Erik Kundiman <erik@megapahit.org> | 2023-10-04 07:00:54 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2023-10-04 07:00:54 +0800 |
| commit | 5daccb743f50c7bca066d737ee18295ed38279de (patch) | |
| tree | a0cd5bd3378b2fc44143658bf2677526bae4c505 /indra/llui/llbutton.cpp | |
| parent | dcdd85e4342305bf363c76e6de1e8f8e0ea8840d (diff) | |
| parent | 5d7b1b09ff195611548bababf36d412ef76ed924 (diff) | |
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/llui/llbutton.cpp')
| -rw-r--r-- | indra/llui/llbutton.cpp | 3 |
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; |
