From: John Darrington Date: Sun, 26 Feb 2023 09:59:50 +0000 (+0100) Subject: Avoid possible null pointer dereference X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ea00dcc1e779203117850aa9cfa6eddca03c766;p=pspp Avoid possible null pointer dereference * modified: src/ui/gui/psppire-encoding-selector.c --- 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;