1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-27 13:53:25 +01:00

settings_load needs to be before init_term

This commit is contained in:
Jfreegman 2014-04-07 06:22:51 -04:00
parent e17b62c98b
commit 5976d33fef
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -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 */