|  | @@ -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)
 | 
	
		
			
				|  |  |  		{
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 |