Fix crash when out of memory in Team Arena's String_Alloc
This commit is contained in:
parent
dcf5707493
commit
a48dcdf224
|
@ -198,6 +198,9 @@ const char *String_Alloc(const char *p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
str = UI_Alloc(sizeof(stringDef_t));
|
str = UI_Alloc(sizeof(stringDef_t));
|
||||||
|
if (!str) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
str->next = NULL;
|
str->next = NULL;
|
||||||
str->str = &strPool[ph];
|
str->str = &strPool[ph];
|
||||||
if (last) {
|
if (last) {
|
||||||
|
|
Loading…
Reference in New Issue