Prevent crash when twc_chat_new returns NULL.

This commit is contained in:
Håvard Pettersson 2014-11-18 15:17:34 +01:00
parent 8ab3ce630b
commit d7a72f3383
1 changed files with 9 additions and 7 deletions

View File

@ -110,6 +110,7 @@ twc_chat_new_group(struct t_twc_profile *profile,
struct t_twc_chat *chat = twc_chat_new(profile, buffer_name);
if (chat)
{
chat->group_number = group_number;
chat->nicklist_group = weechat_nicklist_add_group(chat->buffer, NULL,
@ -120,6 +121,7 @@ twc_chat_new_group(struct t_twc_profile *profile,
NULL, NULL);
weechat_buffer_set(chat->buffer, "nicklist", "1");
}
return chat;
}