Selaa lähdekoodia

Nullkiller: fix build

Andrii Danylchenko 4 vuotta sitten
vanhempi
sitoutus
1d4a349c2c
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      AI/Nullkiller/Goals/CGoal.h

+ 4 - 4
AI/Nullkiller/Goals/CGoal.h

@@ -67,7 +67,7 @@ namespace Goals
 		{
 			TSubgoal single = decomposeSingle();
 
-			if(single->invalid())
+			if(!single || single->invalid())
 				return {};
 			
 			return {single};
@@ -76,19 +76,19 @@ namespace Goals
 	protected:
 		virtual TSubgoal decomposeSingle() const
 		{
-			return sptr(Invalid());
+			return TSubgoal();
 		}
 	};
 
 	template<typename T> class DLL_EXPORT ElementarGoal : public CGoal<T>, public ITask
 	{
 	public:
-		ElementarGoal<T>(EGoals goal = INVALID) : CGoal(goal), ITask()
+		ElementarGoal(EGoals goal = INVALID) : CGoal(goal), ITask()
 		{
 			isAbstract = false;
 		}
 
-		ElementarGoal<T>(const ElementarGoal<T> & other) : CGoal(other), ITask(other)
+		ElementarGoal(const ElementarGoal<T> & other) : CGoal(other), ITask(other)
 		{
 		}