diff --git a/src/common/event.cpp b/src/common/event.cpp index 16a8b98b63..ddd90d8f6d 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1615,15 +1615,9 @@ bool wxEvtHandler::SafelyProcessEvent(wxEvent& event) } catch ( ... ) { - // notice that we do it in 2 steps to avoid warnings about possibly - // uninitialized loop variable from some versions of g++ which are not - // smart enough to figure out that GetActive() doesn't throw and so - // that loop will always be initialized - wxEventLoopBase *loop = NULL; + wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); try { - loop = wxEventLoopBase::GetActive(); - if ( !wxTheApp || !wxTheApp->OnExceptionInMainLoop() ) { if ( loop )