Prevent crash when twc_chat_new returns NULL.
This commit is contained in:
parent
8ab3ce630b
commit
d7a72f3383
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user