X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/gtk1/clipbrd.cpp diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index 6ff7ed1192..2c5b0ff885 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -216,8 +216,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event ) { wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" )); - delete wxTheClipboard->m_data; - wxTheClipboard->m_data = NULL; + wxDELETE(wxTheClipboard->m_data); } } @@ -383,11 +382,7 @@ void wxClipboard::Clear() while (m_waiting) gtk_main_iteration(); } - if (m_data) - { - delete m_data; - m_data = NULL; - } + wxDELETE(m_data); #if wxUSE_THREADS /* re-enable GUI threads */