diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 320c782f6e..a115ade482 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -1149,6 +1149,8 @@ wxString wxTextEntry::GetHint() const bool wxTextEntry::ClickDefaultButtonIfPossible() { GtkWidget* const widget = GTK_WIDGET(GetEntry()); + if (widget == NULL) + return false; // This does the same thing as gtk_entry_real_activate() in GTK itself. //