diff src/account.c @ 8658:4133c85d76f7

[gaim-migrate @ 9410] Fix the problem mentioned on gaim-devel: "Crash when 'Log your own signons/idleness/awayness' is on and a connection is cancelled while connecting" There is a flaw in Gaim here. "You have signed on" can be written to the system log before "You have signed off." This happens when you disconnect an account while it is connected. It's an extremely minor problem and I don't feel like fixing it. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 14 Apr 2004 04:04:42 +0000
parents 0706d86ecec2
children 725413cc9fb9
line wrap: on
line diff
--- a/src/account.c	Wed Apr 14 04:03:14 2004 +0000
+++ b/src/account.c	Wed Apr 14 04:04:42 2004 +0000
@@ -927,9 +927,13 @@
 	g_return_val_if_fail(account != NULL, NULL);
 
 	if(!account->system_log){
+		GaimConnection *gc;
+
+		gc = gaim_account_get_connection(account);
+
 		account->system_log	 = gaim_log_new(GAIM_LOG_SYSTEM,
 				gaim_account_get_username(account), account,
-				account->gc->login_time);
+				gc != NULL ? gc->login_time : time(NULL));
 	}
 
 	return account->system_log;