]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dataobj.cpp
implementation streamlined
[wxWidgets.git] / src / gtk / dataobj.cpp
index e8c5f3d62237d4c8c6cd29e3701574af68c69488..00b429c0b4ef41ef4ae9661df49ad004d29e1bee 100644 (file)
@@ -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());
             }