mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r19782) -Fix [FS#3828]: NULL pointer deference when testing relative scope *action2 on an unbuilt engine.
This commit is contained in:
parent
a8fa3dd3ce
commit
92042c6237
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user