From c9384d50543d655bf06156ca3c0ede9a86eeccee Mon Sep 17 00:00:00 2001 From: rmax Date: Wed, 1 Jun 2005 18:14:40 +0000 Subject: Checking the return value of XScreenSaverQueryInfo. --- unix/tkUnix.c | 7 ++++--- 1 file 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 @@ -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 */ -- cgit v0.12