Fix dangling pointer smuggling in PreviewModelException
This commit is contained in:
parent
2c207a934e
commit
d8e641b977
@ -6,12 +6,12 @@
|
||||
|
||||
struct PreviewModelException: public std::exception
|
||||
{
|
||||
String message;
|
||||
ByteString message;
|
||||
public:
|
||||
PreviewModelException(String message_): message(message_) {}
|
||||
PreviewModelException(String message_): message(message_.ToUtf8()) {}
|
||||
const char * what() const throw() override
|
||||
{
|
||||
return message.ToUtf8().c_str();
|
||||
return message.c_str();
|
||||
}
|
||||
~PreviewModelException() throw() {}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user