浏览代码

Fixed an inverted nullpointer check (#5673)

Fixes #5654

Thanks to @Singe-Horizontal
Lemongrass3110 4 年之前
父节点
当前提交
46cf310364
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;