Changeset - r13102:b67f197f314b
[Not reviewed]
master
0 1 0
smatz - 15 years ago 2009-09-22 18:50:58
smatz@openttd.org
(svn r17614) -Fix: crash when deleting town while TownDirectory is open
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -78,7 +78,6 @@ Town::~Town()
 
	/* Delete town authority window
 
	 * and remove from list of sorted towns */
 
	DeleteWindowById(WC_TOWN_VIEW, this->index);
 
	InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 0);
 

	
 
	/* Delete all industries belonging to the town */
 
	FOR_ALL_INDUSTRIES(i) if (i->town == this) delete i;
 
@@ -121,6 +120,7 @@ Town::~Town()
 
 */
 
void Town::PostDestructor(size_t index)
 
{
 
	InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 0);
 
	UpdateNearestTownForRoadTiles(false);
 
}
 

	
0 comments (0 inline, 0 general)