forked from github/server
CID 22505: Dereference null return value (NULL_RETURNS)
potential bugs at the edge of the map
This commit is contained in:
parent
1df0afc58a
commit
204b4d6b93
|
@ -5954,7 +5954,7 @@ int sp_movecastle(castorder * co)
|
|||
|
||||
target_region = rconnect(r, dir);
|
||||
|
||||
if (!(target_region->terrain->flags & LAND_REGION)) {
|
||||
if (!target_region || !(target_region->terrain->flags & LAND_REGION)) {
|
||||
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order,
|
||||
"sp_movecastle_fail_1", "direction", dir));
|
||||
return cast_level;
|
||||
|
|
Loading…
Reference in New Issue