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); }