From 935ad5acde801102c84f1809252e27054320850b Mon Sep 17 00:00:00 2001 From: Erik Ahlroth <eriah592@student.liu.se> Date: Fri, 18 Oct 2019 13:42:53 +0200 Subject: [PATCH] Updated Unit.cpp. *Removed ensuring there is a target in getTarget(), which solves a crash when debugging during runtime --- src/Unit.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Unit.cpp b/src/Unit.cpp index 0bb94a9..7316c08 100644 --- a/src/Unit.cpp +++ b/src/Unit.cpp @@ -328,7 +328,6 @@ 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 unit has order, check tag of target of first order if(getUnitPtr()->orders.size() > 0){ -- GitLab