From 98d158505dc201eea0df60c5d9703107aa4a6a29 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 9 Aug 2020 18:16:27 +0200 Subject: [PATCH] PsppireSelector: Don't attempt to unref a null pointer --- src/ui/gui/psppire-selector.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.30.2