]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filectrl.cpp
Fix crash in wxDC::GetMultiLineTextExtent() after last commit.
[wxWidgets.git] / src / gtk / filectrl.cpp
index 4c0d97ba34a4967fa548ddf0b0d559188c88bfef..7eaf55511731393e938f559e86e81e9fee725acb 100644 (file)
@@ -88,7 +88,7 @@ bool wxGtkFileChooser::SetPath( const wxString& path )
     if ( path.empty() )
         return true;
 
-    return gtk_file_chooser_set_filename( m_widget, path.utf8_str() );
+    return gtk_file_chooser_set_filename( m_widget, path.utf8_str() ) != 0;
 }
 
 bool wxGtkFileChooser::SetDirectory( const wxString& dir )
@@ -285,6 +285,12 @@ extern "C"
 
 IMPLEMENT_DYNAMIC_CLASS( wxGtkFileCtrl, wxControl )
 
+wxGtkFileCtrl::~wxGtkFileCtrl()
+{
+    if (m_fcWidget)
+        GTKDisconnect(m_fcWidget);
+}
+
 void wxGtkFileCtrl::Init()
 {
     m_checkNextSelEvent = false;