comparison src/idle.c @ 5755:9587ee01dc5d

[gaim-migrate @ 6180] strcmp NULL check from Phroggie. Thanks! committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 05 Jun 2003 00:53:27 +0000
parents c6a30e1868ae
children 059d95c67cda
comparison
equal deleted inserted replaced
5754:48aac80b5d83 5755:9587ee01dc5d
66 time(&t); 66 time(&t);
67 67
68 report_idle = gaim_prefs_get_string("/gaim/gtk/idle/reporting_method"); 68 report_idle = gaim_prefs_get_string("/gaim/gtk/idle/reporting_method");
69 69
70 #ifdef USE_SCREENSAVER 70 #ifdef USE_SCREENSAVER
71 if (!strcmp(report_idle, "system")) { 71 if (report_idle != NULL && !strcmp(report_idle, "system")) {
72 #ifndef _WIN32 72 #ifndef _WIN32
73 int event_base, error_base; 73 int event_base, error_base;
74 if (XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base)) { 74 if (XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base)) {
75 if (mit_info == NULL) { 75 if (mit_info == NULL) {
76 mit_info = XScreenSaverAllocInfo(); 76 mit_info = XScreenSaverAllocInfo();
128 128
129 /* If we're not reporting idle times to the server, still use Gaim 129 /* If we're not reporting idle times to the server, still use Gaim
130 usage for auto-away, but quit here so we don't report to the 130 usage for auto-away, but quit here so we don't report to the
131 server */ 131 server */
132 132
133 if (!strcmp(report_idle, "none")) 133 if (report_idle != NULL && !strcmp(report_idle, "none"))
134 return TRUE; 134 return TRUE;
135 135
136 if (idle_time >= IDLEMARK && !gc->is_idle) { 136 if (idle_time >= IDLEMARK && !gc->is_idle) {
137 gaim_debug(GAIM_DEBUG_INFO, "idle", "Setting %s idle %d seconds\n", 137 gaim_debug(GAIM_DEBUG_INFO, "idle", "Setting %s idle %d seconds\n",
138 gaim_account_get_username(account), idle_time); 138 gaim_account_get_username(account), idle_time);