From 1ea00dcc1e779203117850aa9cfa6eddca03c766 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 26 Feb 2023 10:59:50 +0100 Subject: [PATCH] Avoid possible null pointer dereference * modified: src/ui/gui/psppire-encoding-selector.c --- src/ui/gui/psppire-encoding-selector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-encoding-selector.c b/src/ui/gui/psppire-encoding-selector.c index a551ef0549..33d1af524f 100644 --- a/src/ui/gui/psppire-encoding-selector.c +++ b/src/ui/gui/psppire-encoding-selector.c @@ -212,7 +212,7 @@ psppire_encoding_selector_get_encoding (GtkWidget *selector) g_list_free (list); - if (0 == strcmp (encoding, "Auto")) + if (encoding && (0 == strcmp (encoding, "Auto"))) { g_free (encoding); return NULL; -- 2.30.2