diff options
| -rw-r--r-- | src/font/src/font.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/font/src/font.c b/src/font/src/font.c index 1e1bb6c..ab6865a 100644 --- a/src/font/src/font.c +++ b/src/font/src/font.c @@ -9,6 +9,17 @@ static int renderstr(const enum font f, const short x, short y, const char *str, const bool render, short *const max_x, short *const max_y) { + if (!str) + { + if (max_x) + *max_x = 0; + + if (max_y) + *max_y = 0; + + return 0; + } + static const struct cfg { const struct sprite *s; |
