diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index 6582e8eca4..41735b7fad 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -140,6 +140,11 @@ static uint32 GetObjectIDAtOffset(TileIndex tile, uint32 cur_grfid) const ObjectSpec *spec = ObjectSpec::GetByTile(tile); + /* Default objects have no associated NewGRF file */ + if (spec->grf_prop.grffile == NULL) { + return 0xFFFE; // Defined in another grf file + } + if (spec->grf_prop.grffile->grfid == cur_grfid) { // same object, same grf ? return spec->grf_prop.local_id; }