1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Nullkiller: fix build

This commit is contained in:
Andrii Danylchenko 2021-05-16 14:44:55 +03:00 committed by Andrii Danylchenko
parent c7d35dcc6f
commit 1d4a349c2c

View File

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