]> git.mxchange.org Git - flightgear.git/commitdiff
Close Sqlite3 database *before* trying to delete the file. Will avoid a segfault...
authorFrederic Bouvier <fredfgfs01@free.fr>
Wed, 26 Sep 2012 20:34:48 +0000 (22:34 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Wed, 26 Sep 2012 20:34:48 +0000 (22:34 +0200)
src/Navaids/NavDataCache.cxx

index e073f863f1b0f478ecb8683297d5f217e668f642..061a3ae9dbcc72e5290d17eda422ae2020ecde2b 100644 (file)
@@ -929,10 +929,10 @@ NavDataCache::NavDataCache()
     // reached this point with no exception, success
       break;
     } catch (sg_exception& e) {
-      SG_LOG(SG_NAVCACHE, SG_WARN, "NavCache: init failed:" << e.what()
+      SG_LOG(SG_NAVCACHE, t == 0 ? SG_WARN : SG_ALERT, "NavCache: init failed:" << e.what()
              << " (attempt " << t << ")");
-      homePath.remove();
       d.reset();
+      homePath.remove();
     }
   } // of retry loop