From: John Darrington Date: Sun, 9 Aug 2020 16:16:27 +0000 (+0200) Subject: PsppireSelector: Don't attempt to unref a null pointer X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d158505dc201eea0df60c5d9703107aa4a6a29;p=pspp PsppireSelector: Don't attempt to unref a null pointer --- diff --git a/src/ui/gui/psppire-selector.c b/src/ui/gui/psppire-selector.c index a021d92190..fbc88f1aa8 100644 --- a/src/ui/gui/psppire-selector.c +++ b/src/ui/gui/psppire-selector.c @@ -188,8 +188,11 @@ psppire_selector_dispose (GObject *obj) sel->source_litem = NULL; } - g_object_unref (sel->dest); - g_object_unref (sel->source); + if (sel->dest) + g_object_unref (sel->dest); + + if (sel->source) + g_object_unref (sel->source); /* Chain up to the parent class */ G_OBJECT_CLASS (parent_class)->dispose (obj);