summaryrefslogtreecommitdiff
path: root/ui/folder_history_box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/folder_history_box.cpp')
-rw-r--r--ui/folder_history_box.cpp9
1 files changed, 5 insertions, 4 deletions
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<wxScrolledWindow*>(wnd) != nullptr)
- {
- wnd->GetEventHandler()->AddPendingEvent(event);
- break;
- }
+ if (wxEvtHandler* evtHandler = wnd->GetEventHandler())
+ {
+ evtHandler->AddPendingEvent(event);
+ break;
+ }
// event.Skip();
}
bgstack15