From 6eec5a3eb7f53b643f0835eadf5b22838c4046bd Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 28 Jan 2008 15:03:08 +0000 Subject: [PATCH] Fixed a coding mistake I made in r12142. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12145 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/map/map.c b/src/map/map.c index 25265e59ee..cce232fd20 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1173,6 +1173,8 @@ int map_delobjectnofree(int id) *------------------------------------------*/ int map_delobject(int id) { + struct block_list* bl; + if( id < 0 || id >= MAX_FLOORITEM ) { ShowError("map_delobject: invalid object id '%d'!\n", id); @@ -1182,8 +1184,9 @@ int map_delobject(int id) if(objects[id]==NULL) return 0; + bl = objects[id]; map_delobjectnofree(id); - map_freeblock(objects[id]); + map_freeblock(bl); return 0; }