mirror of https://github.com/OpenTTD/OpenTTD
(svn r10962) -Codechange: protect yourself against an illicit substitution
parent
116de48fdf
commit
b5627afcea
|
@ -274,9 +274,11 @@ static void DrawTile_Industry(TileInfo *ti)
|
||||||
} else {
|
} else {
|
||||||
/* No sprite group (or no valid one) found, meaning no graphics associated.
|
/* No sprite group (or no valid one) found, meaning no graphics associated.
|
||||||
* Use the substitute one instead */
|
* Use the substitute one instead */
|
||||||
gfx = indts->grf_prop.subst_id;
|
if (indts->grf_prop.subst_id != INVALID_INDUSTRYTILE) {
|
||||||
/* And point the industrytile spec accordingly */
|
gfx = indts->grf_prop.subst_id;
|
||||||
indts = GetIndustryTileSpec(indts->grf_prop.subst_id);
|
/* And point the industrytile spec accordingly */
|
||||||
|
indts = GetIndustryTileSpec(gfx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue