From 88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:20:07 +0200 Subject: 5.4 --- ui/folder_history_box.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ui/folder_history_box.cpp') diff --git a/ui/folder_history_box.cpp b/ui/folder_history_box.cpp index 72204c3a..d30ada64 100644 --- a/ui/folder_history_box.cpp +++ b/ui/folder_history_box.cpp @@ -148,10 +148,11 @@ void FolderHistoryBox::OnMouseWheel(wxMouseEvent& event) wxWindow* wnd = this; while ((wnd = wnd->GetParent()) != nullptr) //silence MSVC warning if (dynamic_cast(wnd) != nullptr) - { - wnd->GetEventHandler()->AddPendingEvent(event); - break; - } + if (wxEvtHandler* evtHandler = wnd->GetEventHandler()) + { + evtHandler->AddPendingEvent(event); + break; + } // event.Skip(); } -- cgit