Changeset 2fe5eb9 for irc_channel.c


Ignore:
Timestamp:
2010-07-29T17:08:16Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f7ca587
Parents:
b40e60d
Message:

Clean up references from irc_user structs to channels that are being free()d.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    rb40e60d r2fe5eb9  
    117117{
    118118        irc_t *irc = ic->irc;
     119        GSList *l;
    119120       
    120121        if( ic->flags & IRC_CHANNEL_JOINED )
     
    132133                g_free( ic->users->data );
    133134                ic->users = g_slist_remove( ic->users, ic->users->data );
     135        }
     136       
     137        for( l = irc->users; l; l = l->next )
     138        {
     139                irc_user_t *iu = l->data;
     140               
     141                if( iu->last_channel == ic )
     142                        iu->last_channel = irc->default_channel;
    134143        }
    135144       
Note: See TracChangeset for help on using the changeset viewer.