From 46cf3103645d6d93eea97e3fe75af222a468a345 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Mon, 4 Jan 2021 16:37:03 +0100 Subject: [PATCH] Fixed an inverted nullpointer check (#5673) Fixes #5654 Thanks to @Singe-Horizontal --- src/map/battleground.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/battleground.cpp b/src/map/battleground.cpp index 9cbefa0814..fb17f58846 100644 --- a/src/map/battleground.cpp +++ b/src/map/battleground.cpp @@ -652,7 +652,7 @@ int bg_team_get_id(struct block_list *bl) struct map_session_data *msd; struct mob_data *md = (TBL_MOB*)bl; - if( md->special_state.ai && !(msd = map_id2sd(md->master_id)) ) + if( md->special_state.ai && (msd = map_id2sd(md->master_id)) != nullptr ) return msd->bg_id; return md->bg_id;