From dad727a34acf286ef0f30ca0ee396d3e106be2ec Mon Sep 17 00:00:00 2001 From: skyleo Date: Mon, 2 Dec 2019 18:22:24 +0100 Subject: Expect bl to be not NULL in unit->bl2ud --- src/map/unit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index acf64e820..96222a62f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -72,13 +72,12 @@ struct unit_interface *unit; /** * Returns the unit_data for the given block_list. If the object is using * shared unit_data (i.e. in case of BL_NPC), it returns the shared data. - * @param bl block_list to process + * @param bl block_list to process, it is expected to be not NULL. * @return a pointer to the given object's unit_data **/ static struct unit_data *unit_bl2ud(struct block_list *bl) { - if (bl == NULL) - return NULL; + Assert_retr(NULL, bl != NULL); switch (bl->type) { case BL_PC: return &BL_UCAST(BL_PC, bl)->ud; -- cgit v1.2.3-60-g2f50