diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index f26d11b8..e574f78d 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -198,6 +198,9 @@ const char *String_Alloc(const char *p) { } str = UI_Alloc(sizeof(stringDef_t)); + if (!str) { + return NULL; + } str->next = NULL; str->str = &strPool[ph]; if (last) {