forked from github/server
CID 22549: Dereference before null check (REVERSE_INULL)
This commit is contained in:
parent
e1eb5098d4
commit
1d204b12f1
|
@ -319,18 +319,18 @@ order * ord)
|
||||||
}
|
}
|
||||||
|
|
||||||
a = a_find(u->attribs, &at_museumexit);
|
a = a_find(u->attribs, &at_museumexit);
|
||||||
assert(a);
|
if (a) {
|
||||||
r = findregion(a->data.sa[0], a->data.sa[1]);
|
r = findregion(a->data.sa[0], a->data.sa[1]);
|
||||||
assert(r);
|
assert(r);
|
||||||
a_remove(&u->attribs, a);
|
a_remove(&u->attribs, a);
|
||||||
|
}
|
||||||
/* Übergebene Gegenstände zurückgeben */
|
/* Übergebene Gegenstände zurückgeben */
|
||||||
|
|
||||||
a = a_find(u->attribs, &at_museumgivebackcookie);
|
a = a_find(u->attribs, &at_museumgivebackcookie);
|
||||||
unit_cookie = a->data.i;
|
|
||||||
a_remove(&u->attribs, a);
|
|
||||||
|
|
||||||
if (a) {
|
if (a) {
|
||||||
|
unit_cookie = a->data.i;
|
||||||
|
a_remove(&u->attribs, a);
|
||||||
|
|
||||||
for (a = a_find(warden->attribs, &at_museumgiveback);
|
for (a = a_find(warden->attribs, &at_museumgiveback);
|
||||||
a && a->type == &at_museumgiveback; a = a->next) {
|
a && a->type == &at_museumgiveback; a = a->next) {
|
||||||
if (((museumgiveback *)(a->data.v))->cookie == unit_cookie)
|
if (((museumgiveback *)(a->data.v))->cookie == unit_cookie)
|
||||||
|
|
Loading…
Reference in New Issue