diff --git a/server/gameserver/incubator.cc b/server/gameserver/incubator.cc index a0c79da3..85469f0c 100644 --- a/server/gameserver/incubator.cc +++ b/server/gameserver/incubator.cc @@ -247,15 +247,19 @@ Human* Incubator::ActiveAndroid(Human* hum) AllocAndroid(hum, 1, &androids); if (!androids.empty()) { target = androids[0]; + } else { + } #ifdef DEBUG - room->BroadcastDebugMsg(a8::Format("active android id:%d pos:%f,%f,%f", - { - target->GetUniId(), - target->GetPos().GetX(), - target->GetPos().GetY(), - target->GetPos().GetZ(), - })); + if (target) { + room->BroadcastDebugMsg(a8::Format("active android id:%d pos:%f,%f,%f", + { + target->GetUniId(), + target->GetPos().GetX(), + target->GetPos().GetY(), + target->GetPos().GetZ(), + })); + } #endif return target; }