1
0
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:
DjWarmonger 2016-11-26 17:41:34 +01:00
parent 5058d5771e
commit 58ac31375b

View File

@ -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();
} }
}; };