1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-13 02:33:03 +01:00

potential seg fault

This commit is contained in:
Jfreegman 2013-08-29 23:14:09 -04:00
parent 4f2e80ef28
commit 3d062ca15b
2 changed files with 1 additions and 8 deletions

View File

@ -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) {

View File

@ -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();