X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d257b8db10b5f464d896ff0d4249237d8f587a1..d7b284e5c62523c9a43e26977672b4ff7c5b8981:/src/gtk/dataobj.cpp diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp index e8c5f3d622..00b429c0b4 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -108,7 +108,9 @@ wxDataFormatId wxDataFormat::GetType() const wxString wxDataFormat::GetId() const { - wxString ret = wxString::FromAscii( gdk_atom_name( m_format ) ); + gchar* atom_name = gdk_atom_name( m_format ); + wxString ret = wxString::FromAscii( atom_name ); + g_free(atom_name); return ret; } @@ -280,9 +282,9 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf) AddFile(wxURI::Unescape(filename.c_str() + lenPrefix)); filename.Empty(); } - else + else if ( !filename.empty() ) { - wxLogDebug(_T("Unsupported URI '%s' in wxFileDataObject"), + wxLogDebug(_T("Unsupported URI \"%s\" in wxFileDataObject"), filename.c_str()); }