diff options
author | skyleo <skyleo@skyleo.de> | 2019-09-10 22:00:14 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-03-08 20:56:28 +0100 |
commit | d663f0c9df2c66211718d84ca5f62a8a387445fb (patch) | |
tree | c7cd18ac8cf18b40874bce75bed4749817e9ed04 /src | |
parent | bf40cd64e6bee575ee03eddee8efb033c8b084b5 (diff) | |
download | hercules-d663f0c9df2c66211718d84ca5f62a8a387445fb.tar.gz hercules-d663f0c9df2c66211718d84ca5f62a8a387445fb.tar.bz2 hercules-d663f0c9df2c66211718d84ca5f62a8a387445fb.tar.xz hercules-d663f0c9df2c66211718d84ca5f62a8a387445fb.zip |
Apply code-style to nullpointer-checks in unit->delay_walktoxy_timer
Diffstat (limited to 'src')
-rw-r--r-- | src/map/unit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index d70f76113..790f6b802 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -497,8 +497,7 @@ static int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) static int unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { struct block_list *bl = map->id2bl(id); - - if (!bl || bl->prev == NULL) + if (bl == NULL || bl->prev == NULL) return 0; unit->walktoxy(bl, (short)((data>>16)&0xffff), (short)(data&0xffff), 0); return 1; |