From 93d21ceac74f7c6fdb5f025e9b65db420fdd5ce8 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 27 Apr 2016 06:01:07 -0700 Subject: [PATCH] correctly load default filename Signed-off-by: Dirk Hohndel --- subsurface-mobile-main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index e18d40794..a354aa429 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -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