summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontfreetype.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-02-02 00:34:24 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-02-03 20:50:43 +0200
commitb2f890408e2dc63a0f842273c41c0efed770cb9a (patch)
treeaeea23255f4717f57012d5d42075659ecff6c76a /indra/llrender/llfontfreetype.cpp
parent6f31fabbc2d082b77c8f09bce30234ec9c506e33 (diff)
SL-19089 Changing UI scale crashes viewer
This makes no sense, trying to add a glyph now will have no width or height set, neither character width or heigh, yet release viewer does that. Fixed code to match release and set width and height despite char width not being up to date.
Diffstat (limited to 'indra/llrender/llfontfreetype.cpp')
-rw-r--r--indra/llrender/llfontfreetype.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 5535c07615..e4010579b3 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -798,11 +798,11 @@ void LLFontFreetype::setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32
llassert(!mIsFallback);
llassert(image_raw && (image_raw->getComponents() == 2));
-
U8 *target = image_raw->getData();
+ llassert(target);
- if (!data)
+ if (!data || !target)
{
return;
}