diff options
author | Andre Miranda <andreldm@xfce.org> | 2021-04-08 10:44:14 -0300 |
---|---|---|
committer | Andre Miranda <andreldm@xfce.org> | 2021-04-08 10:44:14 -0300 |
commit | 5faa2b9c316ad4da810fc4009d5201428d55cf7e (patch) | |
tree | 5b8e62e16bfe2156f2c2ed6b96a25d86470c3301 /libxfce4ui/xfce-titled-dialog.c | |
parent | db622456d59bc5a71192db786607da79a12da857 (diff) | |
download | libxfce4ui-5faa2b9c316ad4da810fc4009d5201428d55cf7e.tar.gz |
Check if pixbuf is valid before unref
Diffstat (limited to 'libxfce4ui/xfce-titled-dialog.c')
-rw-r--r-- | libxfce4ui/xfce-titled-dialog.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libxfce4ui/xfce-titled-dialog.c b/libxfce4ui/xfce-titled-dialog.c index 995c072..ef56193 100644 --- a/libxfce4ui/xfce-titled-dialog.c +++ b/libxfce4ui/xfce-titled-dialog.c @@ -189,7 +189,11 @@ xfce_titled_dialog_finalize (GObject *object) g_free (titled_dialog->priv->subtitle); /* release the pixbuf */ - g_object_unref (titled_dialog->priv->pixbuf); + if (titled_dialog->priv->pixbuf) + { + g_object_unref (titled_dialog->priv->pixbuf); + titled_dialog->priv->pixbuf = NULL; + } (*G_OBJECT_CLASS (xfce_titled_dialog_parent_class)->finalize) (object); } |