printers: Avoid dereferencing NULL variable
If line is NULL, then buffer is NULL, and buffer[0] points to nowhere.
This commit is contained in:
parent
ff59277c91
commit
34dadb5ac3
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue