# HG changeset patch # User yexo # Date 2012-01-02 22:58:15 # Node ID 80d0a0322356528ababe03d2d4409612de8db230 # Parent a0daedca90f7b88ebd63e96956862b4ff93e07dc (svn r23721) -Fix (r23070): reading memory of a temporary (already deconstructed) object is invalid diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -327,7 +327,8 @@ static uint32 HouseGetVariable(const Res 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;