Explorar o código

Fixed an inverted nullpointer check (#5673)

Fixes #5654

Thanks to @Singe-Horizontal
Lemongrass3110 %!s(int64=4) %!d(string=hai) anos
pai
achega
46cf310364
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/map/battleground.cpp

+ 1 - 1
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;