1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 09:29:10 +00:00

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

This commit is contained in:
2010-05-10 17:27:34 +00:00
parent a8fa3dd3ce
commit 92042c6237

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();