Skip to content

Commit

Permalink
initialize default options before commandline parsing
Browse files Browse the repository at this point in the history
this fixes a crash on images specified on commandline
  • Loading branch information
nadvornik committed Jul 26, 2012
1 parent cb758c2 commit d17c428
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ gint main(gint argc, gchar *argv[])
DEBUG_1("%s main: pixbuf_inline_register_stock_icons", get_exec_time());
pixbuf_inline_register_stock_icons();

DEBUG_1("%s main: setting default options before commandline handling", get_exec_time());
options = init_options(NULL);
setup_default_options(options);

DEBUG_1("%s main: parse_command_line", get_exec_time());
parse_command_line(argc, argv);

Expand All @@ -818,8 +822,6 @@ gint main(gint argc, gchar *argv[])

/* restore session from the config file */

options = init_options(NULL);
setup_default_options(options);

DEBUG_1("%s main: load_options", get_exec_time());
if (!load_options(options))
Expand Down

0 comments on commit d17c428

Please sign in to comment.