printers: Avoid dereferencing NULL variable

If line is NULL, then buffer is NULL, and buffer[0] points
to nowhere.
This commit is contained in:
Bastien Nocera 2011-10-20 15:50:00 +01:00
parent ff59277c91
commit 34dadb5ac3

View file

@ -752,7 +752,7 @@ line_split (gchar *line)
}
}
if (buffer[0] != '\0')
if (buffer && buffer[0] != '\0')
words[j++] = g_strdup (buffer);
result = g_strdupv (words);