Commit b403b41e authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't crash if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski)

2005-01-17  Matthias Clasen  <mclasen@redhat.com>

	* glib/gconvert.c (g_get_filename_charsets): Don't crash
	if G_FILENAME_ENCODING is empty.  (#164330, Pawel Sakowski)
parent 987a7b01
2005-01-17 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c (g_get_filename_charsets): Don't crash
if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski)
2005-01-15 Tor Lillqvist <tlillqvist@novell.com>
* configure.in: sh portability fix. Use "test" and not [.
......
2005-01-17 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c (g_get_filename_charsets): Don't crash
if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski)
2005-01-15 Tor Lillqvist <tlillqvist@novell.com>
* configure.in: sh portability fix. Use "test" and not [.
......
2005-01-17 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c (g_get_filename_charsets): Don't crash
if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski)
2005-01-15 Tor Lillqvist <tlillqvist@novell.com>
* configure.in: sh portability fix. Use "test" and not [.
......
2005-01-17 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c (g_get_filename_charsets): Don't crash
if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski)
2005-01-15 Tor Lillqvist <tlillqvist@novell.com>
* configure.in: sh portability fix. Use "test" and not [.
......
......@@ -1070,7 +1070,7 @@ g_get_filename_charsets (G_CONST_RETURN gchar ***filename_charsets)
cache->charset = g_strdup (charset);
p = getenv ("G_FILENAME_ENCODING");
if (p != NULL)
if (p != NULL && p[0] != '\0')
{
cache->filename_charsets = g_strsplit (p, ",", 0);
cache->is_utf8 = (strcmp (cache->filename_charsets[0], "UTF-8") == 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment