From 9a2d5a9d254945b6bdc97d83c8748c0ce381b6da Mon Sep 17 00:00:00 2001 From: akinari1087 Date: Fri, 3 May 2013 07:27:07 +0000 Subject: [PATCH] * Follow up to r17311 : Fix compile error under Windows - Fixes bugreport:7643 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17312 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/map/unit.c b/src/map/unit.c index 6692830916..5c368f27cb 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -310,14 +310,15 @@ int unit_delay_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data) int unit_delay_walktobl_timer(int tid, unsigned int tick, int id, intptr_t data) { - struct block_list *bl = map_id2bl(id); + struct block_list *bl = map_id2bl(id), *tbl = map_id2bl(data); - if (!bl || bl->prev == NULL || !data) + if(!bl || bl->prev == NULL || tbl == NULL) return 0; - - struct unit_data* ud = unit_bl2ud(bl); - unit_walktobl(bl, map_id2bl(data), 0, 0); - ud->target_to = 0; + else { + struct unit_data* ud = unit_bl2ud(bl); + unit_walktobl(bl, tbl, 0, 0); + ud->target_to = 0; + } return 1; }