mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
[gamecode] Check resmap return before memset
New gcc (11) Caught another issue (only one this time, which is nice).
This commit is contained in:
parent
48ecfcf411
commit
aa7fe66d9d
1 changed files with 3 additions and 1 deletions
|
@ -1585,7 +1585,9 @@ void *PR_Resources_Find (progs_t *pr, const char *name);
|
|||
#define PR_RESNEW(map) \
|
||||
({ \
|
||||
__auto_type t = PR_RESNEW_NC (map); \
|
||||
memset (t, 0, sizeof (*(map)._free)); \
|
||||
if (t) { \
|
||||
memset (t, 0, sizeof (*(map)._free)); \
|
||||
} \
|
||||
t; \
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue