Changeset 98bca36


Ignore:
Timestamp:
2007-08-20T22:37:17Z (13 years ago)
Author:
VMiklos <vmiklos@…>
Branches:
master
Children:
348a3a2
Parents:
23411c6
Message:

prevent a segfault in skype_read_callback()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skype.c

    r23411c6 r98bca36  
    7373        char **lines, **lineptr, *line, *ptr;
    7474
    75         if( sd->fd == -1 )
     75        if( !sd || sd->fd == -1 )
    7676                return FALSE;
    7777        st = read( sd->fd, buf, sizeof( buf ) );
     
    237237{
    238238        struct skype_data *sd = ic->proto_data;
     239        char *buf;
     240
     241        buf = g_strdup_printf("SET USERSTATUS OFFLINE\n");
     242        skype_write( ic, buf, strlen( buf ) );
     243        g_free(buf);
     244
    239245        g_free(sd->username);
    240246        g_free(sd);
     247        ic->proto_data = NULL;
    241248}
    242249
Note: See TracChangeset for help on using the changeset viewer.