From cbce4d76632a0067799c287c05dbd2e6e96659eb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 22 Sep 2018 19:17:07 +0100 Subject: [PATCH] Work around a stupid assert in GTK wxGUIEventLoop::Dispatch() --- common/widgets/net_selector.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/widgets/net_selector.cpp b/common/widgets/net_selector.cpp index a00ecee6a7..30e828e4bd 100644 --- a/common/widgets/net_selector.cpp +++ b/common/widgets/net_selector.cpp @@ -24,6 +24,10 @@ #include +#ifdef __WXGTK__ +#include +#endif + #include #include #include @@ -128,7 +132,11 @@ public: CaptureMouse(); } +#ifdef __WXGTK__ + gtk_main_iteration(); // work around stupid assert in wxGUIEventLoop::Dispatch() +#else eventLoop.Dispatch(); +#endif if( m_cancelled || m_selected ) break; @@ -194,7 +202,7 @@ protected: rebuildList(); } - // Accecpt single-click closure from m_netListBox + // Accept single-click closure from m_netListBox void onListBoxMouseClick( wxMouseEvent& aEvent ) { wxPoint relativePos = m_netListBox->ScreenToClient( wxGetMousePosition() );