X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22cbd10ea3ab5fead0bbb07107c45d584809fbc3..f7f78039d2e18114efdec0abe46dc4ed2d4529a8:/src/gtk/notebook.cpp diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 0621f9fe5b..113739fb51 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -189,6 +189,8 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) { int sel = win->GetSelection(); + if (sel == -1) + return TRUE; wxGtkNotebookPage *nb_page = win->GetNotebookPage(sel); wxCHECK_MSG( nb_page, FALSE, _T("invalid selection in wxNotebook") );