1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

guard against dereferencing null in the previous

This commit is contained in:
Paul Licameli 2016-11-21 12:55:21 -05:00
parent 3cecbcd44e
commit 6fad643000

View File

@ -18,7 +18,9 @@ void wxTabTraversalWrapperCharHook(wxKeyEvent &event)
if (event.GetKeyCode() == WXK_TAB) {
auto focus = wxWindow::FindFocus();
if (dynamic_cast<wxGrid*>(focus)
|| (focus && dynamic_cast<wxGrid*>(focus->GetParent()->GetParent()))) {
|| (focus &&
focus->GetParent() &&
dynamic_cast<wxGrid*>(focus->GetParent()->GetParent()))) {
// Let wxGrid do its own TAB key handling
event.Skip();
return;