mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:13:01 +01:00
potential seg fault
This commit is contained in:
parent
4f2e80ef28
commit
3d062ca15b
@ -125,7 +125,6 @@ static void delete_friend(Tox *m, ToxWindow *self, int f_num, wint_t key)
|
||||
{
|
||||
tox_delfriend(m, f_num);
|
||||
memset(&(friends[f_num]), 0, sizeof(friend_t));
|
||||
friends[f_num].active = false;
|
||||
|
||||
int i;
|
||||
|
||||
@ -166,12 +165,10 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
|
||||
} else {
|
||||
wattron(self->window, COLOR_PAIR(2) | A_BOLD);
|
||||
wprintw(self->window, " * Open chat with up/down keys and enter. ");
|
||||
wprintw(self->window, "Delete friends with the backspace key\n");
|
||||
wprintw(self->window, "Delete friends with the backspace key\n\n");
|
||||
wattroff(self->window, COLOR_PAIR(2) | A_BOLD);
|
||||
}
|
||||
|
||||
wprintw(self->window, "\n");
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < num_friends; ++i) {
|
||||
|
@ -121,10 +121,6 @@ void del_window(ToxWindow *w)
|
||||
{
|
||||
active_window = windows; // Go to prompt screen
|
||||
delwin(w->window);
|
||||
|
||||
if (w->x)
|
||||
free(w->x);
|
||||
|
||||
w->window = NULL;
|
||||
memset(w, 0, sizeof(ToxWindow));
|
||||
clear();
|
||||
|
Loading…
Reference in New Issue
Block a user