comparison src/connection.c @ 13973:9c0885611b27

[gaim-migrate @ 16531] I see a lot of crashes from callbacks (mostly originating in proxy.c code) that end up crashing in gaim_connection_error() because the connection is invalid. Added a g_return_if_fail() on the connection being valid to protect against that condition as well as log it. committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Thu, 20 Jul 2006 18:32:09 +0000
parents 3ae8a3935406
children 8bda65b88e49
comparison
equal deleted inserted replaced
13972:69496f235130 13973:9c0885611b27
421 gaim_connection_error(GaimConnection *gc, const char *text) 421 gaim_connection_error(GaimConnection *gc, const char *text)
422 { 422 {
423 GaimConnectionUiOps *ops; 423 GaimConnectionUiOps *ops;
424 424
425 g_return_if_fail(gc != NULL); 425 g_return_if_fail(gc != NULL);
426 g_return_if_fail(GAIM_CONNECTION_IS_VALID(gc));
426 g_return_if_fail(text != NULL); 427 g_return_if_fail(text != NULL);
427 428
428 /* If we've already got one error, we don't need any more */ 429 /* If we've already got one error, we don't need any more */
429 if (gc->disconnect_timeout) 430 if (gc->disconnect_timeout)
430 return; 431 return;