mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
GtkSearchBar: Handle lack of an entry
We were not dealing with the possibility of priv->entry being NULL in all places.
This commit is contained in:
parent
0dd1102cc4
commit
115faae371
@ -254,10 +254,13 @@ reveal_child_changed_cb (GObject *object,
|
||||
|
||||
priv->reveal_child = reveal_child;
|
||||
|
||||
if (reveal_child)
|
||||
_gtk_entry_grab_focus (GTK_ENTRY (priv->entry), FALSE);
|
||||
else
|
||||
gtk_entry_set_text (GTK_ENTRY (priv->entry), "");
|
||||
if (priv->entry)
|
||||
{
|
||||
if (reveal_child)
|
||||
_gtk_entry_grab_focus (GTK_ENTRY (priv->entry), FALSE);
|
||||
else
|
||||
gtk_entry_set_text (GTK_ENTRY (priv->entry), "");
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (bar), "search-mode-enabled");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user