mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-08 08:50:56 +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) \
|
#define PR_RESNEW(map) \
|
||||||
({ \
|
({ \
|
||||||
__auto_type t = PR_RESNEW_NC (map); \
|
__auto_type t = PR_RESNEW_NC (map); \
|
||||||
memset (t, 0, sizeof (*(map)._free)); \
|
if (t) { \
|
||||||
|
memset (t, 0, sizeof (*(map)._free)); \
|
||||||
|
} \
|
||||||
t; \
|
t; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue