user-accounts: Fix when GDM isn't installed
When GDM isn't installed, or isn't installed in the correct prefix, avoid accessing std_out[-1] of a 0-length std_out.
This commit is contained in:
parent
2650556c59
commit
3be95176ef
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ update_boolean_from_gconf (GtkWidget *widget,
|
|||
return;
|
||||
}
|
||||
|
||||
if (std_out[strlen (std_out) - 1] == '\n') {
|
||||
if (strlen (std_out) > 0 && std_out[strlen (std_out) - 1] == '\n') {
|
||||
std_out[strlen (std_out) - 1] = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue