correctly load default filename

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-27 06:01:07 -07:00
parent 3946f83ff2
commit 93d21ceac7

View file

@ -40,6 +40,8 @@ int main(int argc, char **argv)
}
git_libgit2_init();
setup_system_prefs();
free((void*)prefs.default_filename);
prefs.default_filename = NULL;
if (uiLanguage(0).contains("-US"))
default_prefs.units = IMPERIAL_units;
prefs = default_prefs;
@ -50,6 +52,8 @@ int main(int argc, char **argv)
loadPreferences();
if (prefs.default_file_behavior == LOCAL_DEFAULT_FILE)
set_filename(prefs.default_filename, true);
else
set_filename(NULL, true);
// some hard coded settings
prefs.animation_speed = 0; // we render the profile to pixmap, no animations