On 9/17/06, Mark Doliner <mark@kingant.net> wrote:
FYI I hope to make the use of GAIM_CONNECTION_IS_VALID not necessary in as
many places as possible.  It's kind of a gross kludge, and shouldn't really be
needed if timeouts are correctly canceled, watchers are destroyed, etc.

So ideally someone will figure out why that check is needed. 

When we disable our account via gaim_account_enable(), we destroy our GaimConnection. If we do this between the call to gaim_proxy_connect() and our prpl's got_login() callback, we will be passing that callback a pointer to freed memory. Hence the check in those functions. Therefore, if we don't find some alternative to GAIM_CONNECTION_IS_VALID, all of the prpls should be using it.

What the checks KingAnt took out last night in the core were supposed to do, I have no idea.