aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-12-13 20:02:55 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2008-12-13 20:02:55 +0000
commit549545b3c4c1f60eb977e1c16042aac6fe42736c (patch)
tree5535de0c17fd243d621563156dfc28cb852037ea
parent77fc000cf5248e3c82d21ee20c02db25191d0f0f (diff)
Checking if acc->prpl->chat_join actually exists before using it. :-/
-rw-r--r--chat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/chat.c b/chat.c
index f7edf2e6..9a880850 100644
--- a/chat.c
+++ b/chat.c
@@ -29,6 +29,9 @@ struct chat *chat_add( irc_t *irc, account_t *acc, char *handle, char *channel )
{
struct chat *c, *l;
set_t *s;
+
+ if( acc->prpl->chat_join == NULL )
+ return NULL;
if( !chat_chanok( channel ) )
return NULL;
@@ -177,7 +180,8 @@ int chat_join( irc_t *irc, struct chat *c, const char *password )
if( nick == NULL )
nick = irc->nick;
- if( ( gc = c->acc->prpl->chat_join( c->acc->ic, c->handle, nick, password ) ) )
+ if( c->acc->prpl->chat_join &&
+ ( gc = c->acc->prpl->chat_join( c->acc->ic, c->handle, nick, password ) ) )
{
g_free( gc->channel );
gc->channel = g_strdup( c->channel );