From fe75150fae6e0aecb0d87a442749e9bd7dbe3cf8 Mon Sep 17 00:00:00 2001 From: Erik Ahlroth <eriah592@student.liu.se> Date: Thu, 10 Oct 2019 16:27:48 +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 | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Unit.cpp b/src/Unit.cpp index d20d062fb..7316c0801 100644 --- a/src/Unit.cpp +++ b/src/Unit.cpp @@ -328,9 +328,6 @@ void Unit::ability(sc2::AbilityID ability, const Unit& target) const Unit Unit::getTarget() const { BOT_ASSERT(isValid(), "Unit is not valid"); - if (!hasTarget()){ - return NULL - } // if unit has order, check tag of target of first order if(getUnitPtr()->orders.size() > 0){ -- GitLab