Don't free a string that is managed by wxGtkString, that's the whole _point_ of wxGtkString.
While we're at it, lets use it some more. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#include "wx/mstream.h"
|
||||
#include "wx/uri.h"
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include "wx/gtk/private.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// global data
|
||||
@@ -110,10 +110,8 @@ wxDataFormatId wxDataFormat::GetType() const
|
||||
|
||||
wxString wxDataFormat::GetId() const
|
||||
{
|
||||
gchar* atom_name = gdk_atom_name( m_format );
|
||||
wxString ret = wxString::FromAscii( atom_name );
|
||||
g_free(atom_name);
|
||||
return ret;
|
||||
wxGtkString atom_name(gdk_atom_name(m_format));
|
||||
return wxString::FromAscii(atom_name);
|
||||
}
|
||||
|
||||
void wxDataFormat::SetId( NativeFormat format )
|
||||
|
Reference in New Issue
Block a user