mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 21:53:27 +01:00
settings_load needs to be before init_term
This commit is contained in:
parent
e17b62c98b
commit
5976d33fef
18
src/main.c
18
src/main.c
@ -496,15 +496,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
free(user_config_dir);
|
||||
|
||||
init_term();
|
||||
Tox *m = init_tox(f_use_ipv4);
|
||||
|
||||
if (m == NULL) {
|
||||
endwin();
|
||||
fprintf(stderr, "Failed to initialize network. Aborting...\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* init user_settings struct and load settings from conf file */
|
||||
user_settings = malloc(sizeof(struct user_settings));
|
||||
|
||||
@ -516,6 +507,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
int settings_err = settings_load(user_settings, NULL);
|
||||
|
||||
init_term();
|
||||
Tox *m = init_tox(f_use_ipv4);
|
||||
|
||||
if (m == NULL) {
|
||||
endwin();
|
||||
fprintf(stderr, "Failed to initialize network. Aborting...\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
prompt = init_windows(m);
|
||||
|
||||
/* create new thread for ncurses stuff */
|
||||
|
Loading…
Reference in New Issue
Block a user