Bug 601512 - Remove unnecessary check in GtkTreeModelFilter

gtk_tree_model_filter_set_visible_func() is checking for
priv->visible_func, but that is always going to be NULL since there's
no way to call this function twice.

Besides that the code itself is wrong, since it tries to call
priv->visible_destroy without making sure that it's not NULL
This commit is contained in:
Alberto Garcia 2009-11-11 12:14:16 +01:00 committed by Kristian Rietveld
parent 7fda8e6378
commit 087348a55d

View File

@ -3058,14 +3058,6 @@ gtk_tree_model_filter_set_visible_func (GtkTreeModelFilter *filter,
g_return_if_fail (func != NULL);
g_return_if_fail (filter->priv->visible_method_set == FALSE);
if (filter->priv->visible_func)
{
GDestroyNotify d = filter->priv->visible_destroy;
filter->priv->visible_destroy = NULL;
d (filter->priv->visible_data);
}
filter->priv->visible_func = func;
filter->priv->visible_data = data;
filter->priv->visible_destroy = destroy;