mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-05 02:36:45 +02:00
made error handling more consistent and added exit function
This commit is contained in:
@ -17,8 +17,6 @@
|
||||
#include "friendlist.h"
|
||||
|
||||
extern char *DATA_FILE;
|
||||
extern int store_data(Tox *m, char *path);
|
||||
|
||||
extern ToxWindow *prompt;
|
||||
|
||||
typedef struct {
|
||||
@ -136,9 +134,10 @@ static void select_friend(Tox *m, wint_t key)
|
||||
} else return; /* Bad key input */
|
||||
|
||||
/* If we reach this something is wrong */
|
||||
fprintf(stderr, "select_friend() failed. Aborting...\n");
|
||||
endwin();
|
||||
tox_kill(m);
|
||||
exit(2);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static void delete_friend(Tox *m, ToxWindow *self, int f_num, wint_t key)
|
||||
|
Reference in New Issue
Block a user