Avoid Gtk-CRITICAL "gtk_widget_get_toplevel: assertion 'GTK_IS_WIDGET (widget)' failed"

Happens when running the tests
This commit is contained in:
Paul Cornett
2020-07-20 10:23:52 -07:00
parent 6a2005945a
commit f0cf9401b0

View File

@@ -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.
//