summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorrmax <rmax>2005-06-01 18:14:40 (GMT)
committerrmax <rmax>2005-06-01 18:14:40 (GMT)
commitc9384d50543d655bf06156ca3c0ede9a86eeccee (patch)
treee9a6825283b299dd3ed1e6cdc9cde8f6854e84e6 /unix
parente0309015545d3beaab3e885dc0198de4a0fea135 (diff)
downloadtk-c9384d50543d655bf06156ca3c0ede9a86eeccee.zip
tk-c9384d50543d655bf06156ca3c0ede9a86eeccee.tar.gz
tk-c9384d50543d655bf06156ca3c0ede9a86eeccee.tar.bz2
Checking the return value of XScreenSaverQueryInfo.
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/unix/tkUnix.c b/unix/tkUnix.c
index b4d2d67..3a28cd3 100644
--- a/unix/tkUnix.c
+++ b/unix/tkUnix.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnix.c,v 1.8 2005/06/01 16:36:29 rmax Exp $
+ * RCS: @(#) $Id: tkUnix.c,v 1.9 2005/06/01 18:14:40 rmax Exp $
*/
#include <tkInt.h>
@@ -201,8 +201,9 @@ Tk_GetUserInactiveTime(dpy)
major == 1 && minor == 0 ) {
XScreenSaverInfo *info = XScreenSaverAllocInfo();
- XScreenSaverQueryInfo(dpy, DefaultRootWindow(dpy), info);
- inactiveTime = info->idle;
+ if (XScreenSaverQueryInfo(dpy, DefaultRootWindow(dpy), info)) {
+ inactiveTime = info->idle;
+ }
XFree(info);
}
#endif /* HAVE_XSS */