[gnome-control-center] user-accounts: Fix when GDM isn't installed
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Fix when GDM isn't installed
- Date: Fri, 21 Jan 2011 14:28:16 +0000 (UTC)
commit 3be95176ef509b1c56a76145614142562ba576d6
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jan 21 14:27:08 2011 +0000
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.
panels/user-accounts/um-login-options.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/user-accounts/um-login-options.c b/panels/user-accounts/um-login-options.c
index 21fca28..78c2700 100644
--- a/panels/user-accounts/um-login-options.c
+++ b/panels/user-accounts/um-login-options.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]