mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed CID 1197636.
This commit is contained in:
parent
5058d5771e
commit
58ac31375b
@ -372,11 +372,13 @@ public:
|
|||||||
};
|
};
|
||||||
class goalFulfilledException : public std::exception
|
class goalFulfilledException : public std::exception
|
||||||
{
|
{
|
||||||
|
std::string msg;
|
||||||
public:
|
public:
|
||||||
Goals::TSubgoal goal;
|
Goals::TSubgoal goal;
|
||||||
|
|
||||||
explicit goalFulfilledException(Goals::TSubgoal Goal) : goal(Goal)
|
explicit goalFulfilledException(Goals::TSubgoal Goal) : goal(Goal)
|
||||||
{
|
{
|
||||||
|
msg = goal->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~goalFulfilledException() throw ()
|
virtual ~goalFulfilledException() throw ()
|
||||||
@ -385,7 +387,7 @@ public:
|
|||||||
|
|
||||||
const char *what() const throw () override
|
const char *what() const throw () override
|
||||||
{
|
{
|
||||||
return goal->name().c_str();
|
return msg.c_str();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user