Return wxString for gfx importer messages
Returning a reference to a temporary value crashes when the value is deallocated before use. Passing a full string fixes the crash and allows NVRO on the temporary value.
This commit is contained in:
parent
fc8ffd8421
commit
4ec3f18fda
|
@ -217,7 +217,7 @@ public:
|
|||
/**
|
||||
* @return the list of messages in one string. Each message ends by '\n'
|
||||
*/
|
||||
const wxString& GetMessages() const override
|
||||
wxString GetMessages() const override
|
||||
{
|
||||
return m_messages;
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
*
|
||||
* @return the list of messages in one string. Each message ends by '\n'
|
||||
*/
|
||||
const virtual wxString& GetMessages() const = 0;
|
||||
virtual wxString GetMessages() const = 0;
|
||||
|
||||
protected:
|
||||
///> Importer used to create objects representing the imported shapes.
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
*
|
||||
* @return the list of messages in one string. Each message ends by '\n'
|
||||
*/
|
||||
const wxString& GetMessages() const
|
||||
wxString GetMessages() const
|
||||
{
|
||||
return m_plugin->GetMessages();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
/**
|
||||
* @return the list of messages in one string. Each message ends by '\n'
|
||||
*/
|
||||
const wxString& GetMessages() const override
|
||||
wxString GetMessages() const override
|
||||
{
|
||||
return m_messages;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue