diff src/buddy.c @ 3726:d85208a99af2

[gaim-migrate @ 3862] (12:18:46) Robot101: it switches the .desktop file to the new KDE/GNOME common vfolder format (12:18:48) Robot101: and location (12:19:01) Robot101: and it moves a function from util.c to aim.c and makes it static (12:19:08) Robot101: because it's only used by the main window and removes a function herman #ifdef 0'ed, and fixes a segfault in the docklet. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 17 Oct 2002 16:25:54 +0000
parents d7e83b4db191
children 9f1893ad06e8
line wrap: on
line diff
--- a/src/buddy.c	Thu Oct 17 05:06:15 2002 +0000
+++ b/src/buddy.c	Thu Oct 17 16:25:54 2002 +0000
@@ -2047,9 +2047,7 @@
 }
 
 void docklet_remove() {
-	if (docklet_count) {
-		docklet_count--;
-	}
+	docklet_count--;
 	debug_printf("docklet_count: %d\n",docklet_count);
 	if (!docklet_count) {
 		if (connections) {
@@ -2064,7 +2062,7 @@
 	/* Useful for the docklet plugin and also for the win32 tray icon*/
 	/* This is called when one of those is clicked--it will show/hide the 
 	   buddy list/login window--depending on which is active */
-	if (connections) {
+	if (connections && blist) {
 		if (GTK_WIDGET_VISIBLE(blist)) {
 			if (GAIM_WINDOW_ICONIFIED(blist)) {
 				unhide_buddy_list();
@@ -2074,6 +2072,9 @@
 		} else {
 			unhide_buddy_list();
 		}
+	} else if (connections) {
+		/* we're logging in or something... do nothing */
+		debug_printf("docklet_toggle called with connections but no blist!\n");
 	} else {
 		if (GTK_WIDGET_VISIBLE(mainwindow)) {
 			if (GAIM_WINDOW_ICONIFIED(mainwindow)) {