summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2012-01-02 22:58:15 +0000
committeryexo <yexo@openttd.org>2012-01-02 22:58:15 +0000
commitc4e2dfdd89a21b88fea6b385a25c118e9c94cdbe (patch)
treef1532b36e0156cc5f441e6afe8c131f72e6b1831 /src/newgrf_house.cpp
parentd2f776ef3ee7bd78eb1daec310f3e253b8323ea0 (diff)
downloadopenttd-c4e2dfdd89a21b88fea6b385a25c118e9c94cdbe.tar.xz
(svn r23721) -Fix (r23070): reading memory of a temporary (already deconstructed) object is invalid
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 0ce9c8855..1ee9198bd 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -327,7 +327,8 @@ static uint32 HouseGetVariable(const ResolverObject *object, byte variable, uint
int8 y_offs = GB(GetRegister(0x100), 8, 8);
TileIndex testtile = TILE_MASK(tile + TileDiffXY(x_offs, y_offs));
- const StationList *sl = StationFinder(TileArea(testtile, 1, 1)).GetStations();
+ StationFinder stations(TileArea(testtile, 1, 1));
+ const StationList *sl = stations.GetStations();
/* Collect acceptance stats. */
uint32 res = 0;