diff --git a/src/groupchat.c b/src/groupchat.c index 1a638b2..2895485 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -160,12 +160,10 @@ static void kill_groupchat_window(ToxWindow *self) del_window(self); } -/* Closes groupchat window and cleans up. - * If delete_group is true the group will be permanently deleted. - */ +/* Closes groupchat window and cleans up. */ void close_groupchat(ToxWindow *self, Tox *m, int groupnum, const char *partmessage, int length) { - tox_group_delete(m, groupnum, (const uint8_t *) partmessage, (uint16_t) length); + tox_group_delete(m, groupnum, (uint8_t *) partmessage, (uint16_t) length); free(groupchats[groupnum].peer_names); free(groupchats[groupnum].peer_name_lengths); diff --git a/src/windows.c b/src/windows.c index fe5b135..d36f02a 100644 --- a/src/windows.c +++ b/src/windows.c @@ -661,7 +661,7 @@ void kill_all_windows(Tox *m) if (windows[i].is_chat) kill_chat_window(&windows[i], m); else if (windows[i].is_groupchat) - close_groupchat(&windows[i], m, i, "Quit.", 5); + close_groupchat(&windows[i], m, windows[i].num, "Quit.", 5); } kill_prompt_window(prompt);