diff options
-rw-r--r-- | protocols/twitter/twitter_lib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index d1b65c26..05607164 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -65,6 +65,8 @@ static void twitter_groupchat_init(struct im_connection *ic); */ static void txu_free(struct twitter_xml_user *txu) { + if (txu == NULL) + return; g_free(txu->name); g_free(txu->screen_name); g_free(txu); @@ -88,6 +90,8 @@ static void txs_free(struct twitter_xml_status *txs) static void txl_free(struct twitter_xml_list *txl) { GSList *l; + if (txl == NULL) + return; for ( l = txl->list; l ; l = g_slist_next(l) ) if (txl->type == TXL_STATUS) txs_free((struct twitter_xml_status *)l->data); @@ -472,6 +476,9 @@ static void twitter_groupchat(struct im_connection *ic, GSList *list) for ( l = list; l ; l = g_slist_next(l) ) { status = l->data; + if (status->user == NULL || status->text == NULL) + continue; + twitter_add_buddy(ic, status->user->screen_name, status->user->name); strip_html(status->text); @@ -735,4 +742,4 @@ void twitter_friendships_create_destroy(struct im_connection *ic, char *who, int args[0] = "screen_name"; args[1] = who; twitter_http(ic, create ? TWITTER_FRIENDSHIPS_CREATE_URL : TWITTER_FRIENDSHIPS_DESTROY_URL, twitter_http_post, ic, 1, args, 2); -}
\ No newline at end of file +} |