diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-31 11:28:17 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-31 11:28:17 +0100 |
commit | 6220254c1ecebce81ab765260ec0af3c3818f9a6 (patch) | |
tree | b7e3af149452607a7bdcc782350753a08385009b | |
parent | 15bc063f3b8cf99f5fdc7983192a521ac115e465 (diff) |
Check td->log everywhere before using it..
-rw-r--r-- | protocols/twitter/twitter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index f655731b..50bf6cd2 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -510,7 +510,7 @@ static void twitter_handle_command( struct im_connection *ic, char *message ) else { id = g_ascii_strtoull( cmd[1], NULL, 10 ); - if( id < TWITTER_LOG_LENGTH ) + if( id < TWITTER_LOG_LENGTH && td->log ) id = td->log[id].id; } @@ -536,7 +536,7 @@ static void twitter_handle_command( struct im_connection *ic, char *message ) id = tud->last_id; } else if( ( id = g_ascii_strtoull( cmd[1], NULL, 10 ) ) && - ( id < TWITTER_LOG_LENGTH ) ) + ( id < TWITTER_LOG_LENGTH ) && td->log ) { bu = td->log[id].bu; if( g_slist_find( ic->bee->users, bu ) ) |