Commit 96b6dc45 authored by Guido Gunther's avatar Guido Gunther
Browse files

PhoshBackground: Use g_autoptr instead of explicit unref


Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 454350f3
......@@ -85,7 +85,7 @@ load_background (PhoshBackground *self,
const char* uri)
{
PhoshBackgroundPrivate *priv = phosh_background_get_instance_private (self);
GdkPixbuf *image = NULL;
g_autoptr(GdkPixbuf) image = NULL;
const gchar *xpm_data[] = {"1 1 1 1", "_ c WebGrey", "_"};
GError *err = NULL;
gint width, height;
......@@ -114,7 +114,6 @@ load_background (PhoshBackground *self,
gtk_window_get_size (GTK_WINDOW (self), &width, &height);
priv->pixbuf = image_background (image, width, height);
g_object_unref (image);
/* force background redraw */
gtk_widget_queue_draw (GTK_WIDGET (self));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment