cleanup
[pspp] / src / ui / gui / psppire-encoding-selector.c
index 536f3a595243ff8cb7459833dccf44f6cf4a8b80..33d1af524f0b1fd7655a09261d8b610030f3480f 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "ui/gui/psppire-encoding-selector.h"
 
-#include <assert.h>
 #include <stdlib.h>
 
 #include "libpspp/cast.h"
@@ -183,8 +182,8 @@ psppire_encoding_selector_new (const char *default_encoding,
   return hbox;
 }
 
-/* 
-   Return a string describing the currently selected encoding. 
+/*
+   Return a string describing the currently selected encoding.
    The caller should free this string when no longer required.
 */
 gchar *
@@ -213,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;