From: Frederic Bouvier Date: Wed, 26 Sep 2012 20:34:48 +0000 (+0200) Subject: Close Sqlite3 database *before* trying to delete the file. Will avoid a segfault... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ba8190d97f62b60f5b040ae332cddef9c607048d;p=flightgear.git Close Sqlite3 database *before* trying to delete the file. Will avoid a segfault when the schema is out of date --- diff --git a/src/Navaids/NavDataCache.cxx b/src/Navaids/NavDataCache.cxx index e073f863f..061a3ae9d 100644 --- a/src/Navaids/NavDataCache.cxx +++ b/src/Navaids/NavDataCache.cxx @@ -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