X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7eb670ac1496863b7b2717284037d485597ce75b..e8fd252ef87d8ff6409d405218ff02c91b980e0a:/src/gtk/clipbrd.cpp?ds=inline diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index 56fa9e1eb8..924f7c88c0 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -75,10 +75,11 @@ public: ~wxClipboardSync() { +#if wxUSE_CONSOLE_EVENTLOOP // ensure that there is a running event loop: this might not be the // case if we're called before the main event loop startup wxEventLoopGuarantor ensureEventLoop; - +#endif while (ms_clipboard) wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_CLIPBOARD); } @@ -485,11 +486,7 @@ GdkAtom wxClipboard::GTKGetClipboardAtom() const void wxClipboard::GTKClearData(Kind kind) { wxDataObject *&data = Data(kind); - if ( data ) - { - delete data; - data = NULL; - } + wxDELETE(data); } bool wxClipboard::SetSelectionOwner(bool set)