CID 22505: Dereference null return value (NULL_RETURNS)

potential bugs at the edge of the map
This commit is contained in:
Enno Rehling 2015-10-30 12:52:18 +01:00
parent 1df0afc58a
commit 204b4d6b93
1 changed files with 1 additions and 1 deletions

View File

@ -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;