X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c54277e538b22e5b388030c70b47d050455432f..5d7792236f7e4fcbb94cdc2a5213e0c5788e8c28:/src/gtk/clipbrd.cpp diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index a3544a4103..8276951829 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -75,6 +75,10 @@ public: ~wxClipboardSync() { + // 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; + while (ms_clipboard) wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_CLIPBOARD); }