]> git.saurik.com Git - wxWidgets.git/commitdiff
making sure it always returns a valid string
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 10 Dec 2007 22:00:03 +0000 (22:00 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 10 Dec 2007 22:00:03 +0000 (22:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dataobj.cpp

index c31a36f618911dc1b09b5eca754210eb1d1179dd..cdec68b05d7028d784a85c4fa2fe733d446ead98 100644 (file)
@@ -147,10 +147,7 @@ void wxDataFormat::SetType( wxDataFormatId dataType )
 
 wxString wxDataFormat::GetId() const
 {
-    wxCHECK_MSG( !IsStandard(), wxEmptyString,
-                 wxT("name of predefined format cannot be retrieved") );
-
-    return m_id;
+    return wxCFStringRef(wxCFRetain((CFStringRef)m_format)).AsString();
 }
 
 void wxDataFormat::SetId( NativeFormat format )