summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-06-02 23:07:11 +0200
committerraysan5 <[email protected]>2020-06-02 23:07:11 +0200
commitb00ab118c6a86713042ebc172a7108682a268a03 (patch)
treeb005a76a9643d53abf4ac606984876619aee8fd1 /src/text.c
parent8a501ef06d92ded1892413dd2a8d7fe495b2efe9 (diff)
downloadraylib-b00ab118c6a86713042ebc172a7108682a268a03.tar.gz
raylib-b00ab118c6a86713042ebc172a7108682a268a03.zip
[examples] text_font_sdf - Corrected bug
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/text.c b/src/text.c
index 3c2c9924..51fee3eb 100644
--- a/src/text.c
+++ b/src/text.c
@@ -622,6 +622,12 @@ Image GenImageFontAtlas(const CharInfo *chars, Rectangle **charRecs, int charsCo
{
Image atlas = { 0 };
+ if (chars == NULL)
+ {
+ TraceLog(LOG_WARNING, "FONT: Provided chars info not valid, returning empty image atlas");
+ return atlas;
+ }
+
*charRecs = NULL;
// In case no chars count provided we suppose default of 95