Fix couple static code analyzer warnings

This commit is contained in:
Pasi Kallinen
2017-08-02 19:48:44 +03:00
parent b13bae91dc
commit b4e4d70008

View File

@@ -498,7 +498,7 @@ long wp_mask;
for (obj = invent; obj; obj = obj->nobj) {
if (obj != otmp && obj->oartifact) {
art = get_artifact(obj);
if (art->cary.adtyp == dtyp) {
if (art && art->cary.adtyp == dtyp) {
mask = (long *) 0;
break;
}
@@ -519,7 +519,8 @@ long wp_mask;
for (obj = invent; obj; obj = obj->nobj)
if (obj != otmp && obj->oartifact) {
art = get_artifact(obj);
spfx &= ~art->cspfx;
if (art)
spfx &= ~art->cspfx;
}
}