From 6fad64300025e61893485d068905b6caff523923 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 21 Nov 2016 12:55:21 -0500 Subject: [PATCH] guard against dereferencing null in the previous --- src/widgets/wxPanelWrapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/wxPanelWrapper.cpp b/src/widgets/wxPanelWrapper.cpp index d4bee55bf..3cea4c659 100644 --- a/src/widgets/wxPanelWrapper.cpp +++ b/src/widgets/wxPanelWrapper.cpp @@ -18,7 +18,9 @@ void wxTabTraversalWrapperCharHook(wxKeyEvent &event) if (event.GetKeyCode() == WXK_TAB) { auto focus = wxWindow::FindFocus(); if (dynamic_cast(focus) - || (focus && dynamic_cast(focus->GetParent()->GetParent()))) { + || (focus && + focus->GetParent() && + dynamic_cast(focus->GetParent()->GetParent()))) { // Let wxGrid do its own TAB key handling event.Skip(); return;