mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-02 17:00:19 +00:00
picture: Make setters actually take NULL
gtk_picture_set_file was claiming to be nullable, but choked on NULL. Fixes: #3974
This commit is contained in:
parent
cbe2aa716d
commit
8f4b0cd30d
@ -586,7 +586,11 @@ gtk_picture_set_file (GtkPicture *self,
|
||||
g_set_object (&self->file, file);
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_FILE]);
|
||||
|
||||
paintable = gdk_paintable_new_from_file_scaled (file, gtk_widget_get_scale_factor (GTK_WIDGET (self)));
|
||||
if (file)
|
||||
paintable = gdk_paintable_new_from_file_scaled (file, gtk_widget_get_scale_factor (GTK_WIDGET (self)));
|
||||
else
|
||||
paintable = NULL;
|
||||
|
||||
gtk_picture_set_paintable (self, paintable);
|
||||
g_clear_object (&paintable);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user