Skip to content
Snippets Groups Projects
Commit 3c0d963b authored by Erik Ahlroth's avatar Erik Ahlroth :bug:
Browse files

added fix for unit debugg crash

parent 1fbb9529
No related branches found
No related tags found
1 merge request!1Fixed debugging Units
......@@ -328,7 +328,9 @@ void Unit::ability(sc2::AbilityID ability, const Unit& target) const
Unit Unit::getTarget() const
{
BOT_ASSERT(isValid(), "Unit is not valid");
BOT_ASSERT(hasTarget(), "Unit has no target");
if (!hasTarget()){
return NULL
}
// if unit has order, check tag of target of first order
if(getUnitPtr()->orders.size() > 0){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment