X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Flock.c;h=bd44a1afc3eb5f3eaf7ca2513b1e8a706bd3b8c8;hb=93f25dc6827112d98b8b855ea85c8f5eb8123086;hp=26441f071261c8fb522fb45ee0a698e2bb3d6fb3;hpb=c596d1306f5f92f7eab76224d3b049980a14adcb;p=xscreensaver diff --git a/driver/lock.c b/driver/lock.c index 26441f07..bd44a1af 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -17,13 +17,13 @@ # include "config.h" #endif -#ifndef NO_LOCKING /* whole file */ - #include #include /* for time() */ #include "xscreensaver.h" #include "resources.h" +#ifndef NO_LOCKING /* (mostly) whole file */ + #ifdef HAVE_SYSLOG # include #endif /* HAVE_SYSLOG */ @@ -170,7 +170,7 @@ make_passwd_window (saver_info *si) pw->heading_label = s; } - pw->user_string = (p->pw_name ? p->pw_name : "???"); + pw->user_string = (p && p->pw_name ? p->pw_name : "???"); pw->passwd_string = strdup(""); f = get_string_resource ("passwd.headingFont", "Dialog.Font"); @@ -1234,6 +1234,8 @@ set_locked_p (saver_info *si, Bool locked_p) #ifdef HAVE_XF86VMODE xfree_lock_mode_switch (si, locked_p); /* turn off/on C-Alt-Plus */ #endif + + store_saver_status (si); /* store locked-p */ }