X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2b510728e3d5bc585a534563d013394d647caaf..260020e39271329f71d1ef7912e3dc8216a2e924:/src/gtk/clipbrd.cpp diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index ea30f41d24..649b4424d8 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -393,10 +393,8 @@ wxClipboard::~wxClipboard() { Clear(); - if ( m_clipboardWidget ) - gtk_widget_destroy( m_clipboardWidget ); - if ( m_targetsWidget ) - gtk_widget_destroy( m_targetsWidget ); + gtk_widget_destroy( m_clipboardWidget ); + gtk_widget_destroy( m_targetsWidget ); } // ---------------------------------------------------------------------------- @@ -411,7 +409,7 @@ GdkAtom wxClipboard::GTKGetClipboardAtom() const void wxClipboard::GTKClearData(Kind kind) { - wxDataObject *&data = Data(); + wxDataObject *&data = Data(kind); if ( data ) { delete data; @@ -441,7 +439,7 @@ void wxClipboard::AddSupportedTarget(GdkAtom atom) { gtk_selection_add_target ( - GTK_WIDGET(m_clipboardWidget), + m_clipboardWidget, GTKGetClipboardAtom(), atom, 0 // info (same as client data) unused