diff options
Diffstat (limited to 'shell/e-shell-content.c')
-rw-r--r-- | shell/e-shell-content.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c index fba96d7477..965fab8672 100644 --- a/shell/e-shell-content.c +++ b/shell/e-shell-content.c @@ -254,13 +254,13 @@ shell_content_forall (GtkContainer *container, gpointer callback_data) { EShellContentPrivate *priv; - GtkWidget *parent; + GtkWidget *parent = NULL; priv = E_SHELL_CONTENT_GET_PRIVATE (container); - parent = gtk_widget_get_parent (priv->searchbar); + if (priv->searchbar != NULL) + parent = gtk_widget_get_parent (priv->searchbar); - if (include_internals && priv->searchbar != NULL && - container == GTK_CONTAINER (parent)) + if (include_internals && parent == GTK_WIDGET (container)) callback (priv->searchbar, callback_data); /* Chain up to parent's forall() method. */ |