(svn r19782) -Fix [FS#3828]: NULL pointer deference when testing relative scope *action2 on an unbuilt engine.

This commit is contained in:
peter1138 2010-05-10 17:27:34 +00:00
parent a8fa3dd3ce
commit 92042c6237
1 changed files with 1 additions and 0 deletions

View File

@ -374,6 +374,7 @@ static inline const Vehicle *GRV(const ResolverObject *object)
case VSG_SCOPE_SELF: return object->u.vehicle.self;
case VSG_SCOPE_PARENT: return object->u.vehicle.parent;
case VSG_SCOPE_RELATIVE: {
if (object->u.vehicle.self == NULL) return NULL;
const Vehicle *v = NULL;
switch (GB(object->count, 6, 2)) {
default: NOT_REACHED();