summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-12-02 18:22:24 +0100
committerHaru <haru@dotalux.com>2020-03-08 20:59:35 +0100
commitdad727a34acf286ef0f30ca0ee396d3e106be2ec (patch)
treea2c46e894f09abc08c6a62688009124e1d851fac /src/map/unit.c
parent01f807099010544eadc1327124cf3772ca0952d6 (diff)
downloadhercules-dad727a34acf286ef0f30ca0ee396d3e106be2ec.tar.gz
hercules-dad727a34acf286ef0f30ca0ee396d3e106be2ec.tar.bz2
hercules-dad727a34acf286ef0f30ca0ee396d3e106be2ec.tar.xz
hercules-dad727a34acf286ef0f30ca0ee396d3e106be2ec.zip
Expect bl to be not NULL in unit->bl2ud
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c5
1 files changed, 2 insertions, 3 deletions
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;