Changeset - r16027:6ca2121f471f
[Not reviewed]
master
0 1 0
yexo - 14 years ago 2010-09-03 22:28:11
yexo@openttd.org
(svn r20730) -Fix: crash when removing an object while the newgrf debug window was open for that object
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/object_cmd.cpp
Show inline comments
 
@@ -34,6 +34,7 @@
 
#include "newgrf_config.h"
 
#include "newgrf_object.h"
 
#include "date_func.h"
 
#include "newgrf_debug.h"
 

	
 
#include "table/strings.h"
 
#include "table/object_land.h"
 
@@ -338,7 +339,11 @@ static Foundation GetFoundation_Object(T
 
static void ReallyClearObjectTile(Object *o)
 
{
 
	Object::DecTypeCount(GetObjectType(o->location.tile));
 
	TILE_AREA_LOOP(tile_cur, o->location) MakeWaterKeepingClass(tile_cur, GetTileOwner(tile_cur));
 
	TILE_AREA_LOOP(tile_cur, o->location) {
 
		DeleteNewGRFInspectWindow(GSF_OBJECTS, tile_cur);
 

	
 
		MakeWaterKeepingClass(tile_cur, GetTileOwner(tile_cur));
 
	}
 
	delete o;
 
}
 

	
0 comments (0 inline, 0 general)