Mercurial > pidgin.yaz
changeset 2114:c582116e8463
[gaim-migrate @ 2124]
this might stop the occasional segfault.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 03 Aug 2001 09:40:13 +0000 |
parents | 9f83b7ef1fdc |
children | 3ce77b547cf2 |
files | src/idle.c |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/idle.c Fri Aug 03 00:39:48 2001 +0000 +++ b/src/idle.c Fri Aug 03 09:40:13 2001 +0000 @@ -56,13 +56,14 @@ #ifdef USE_SCREENSAVER if (report_idle == IDLE_SCREENSAVER) { - if (!d) - d = XOpenDisplay((char *)NULL); - if (mit_info == NULL) { - mit_info = XScreenSaverAllocInfo(); - } - XScreenSaverQueryInfo(d, DefaultRootWindow(d), mit_info); - idle_time = (mit_info->idle) / 1000; + if (d || (d = XOpenDisplay((char *)NULL))) { + if (mit_info == NULL) { + mit_info = XScreenSaverAllocInfo(); + } + XScreenSaverQueryInfo(d, DefaultRootWindow(d), mit_info); + idle_time = (mit_info->idle) / 1000; + } else + idle_time = 0; } else #endif /* USE_SCREENSAVER */ idle_time = t - gc->lastsent;