Remove redundant checks for NULL
Remove checks for NULL before g_free() and g_clear_object(). Merge check for NULL, freeing of pointer and its setting to NULL by g_clear_pointer(). https://bugzilla.gnome.org/show_bug.cgi?id=733157
This commit is contained in:
@ -902,11 +902,7 @@ gtk_numerable_icon_set_background_gicon (GtkNumerableIcon *self,
|
||||
|
||||
g_return_if_fail (GTK_IS_NUMERABLE_ICON (self));
|
||||
|
||||
if (self->priv->background_icon_name != NULL)
|
||||
{
|
||||
g_free (self->priv->background_icon_name);
|
||||
self->priv->background_icon_name = NULL;
|
||||
}
|
||||
g_clear_pointer (&self->priv->background_icon_name, g_free);
|
||||
|
||||
res = real_set_background_icon (self, icon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user