mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 08:33:36 +02:00
Do debug check for closing of DB before Project destruction safely...
... It wasn't safe, on some platforms, because the sequence of destruction of ProjectFileIO and ConnectionPtr is unspecified. It is safer that ConnectionPtr just checks itself, not that ProjectFileIO fetches it again.
This commit is contained in:
@@ -298,7 +298,10 @@ int DBConnection::CheckpointHook(void *data, sqlite3 *db, const char *schema, in
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
ConnectionPtr::~ConnectionPtr() = default;
|
||||
ConnectionPtr::~ConnectionPtr()
|
||||
{
|
||||
wxASSERT_MSG(mpConnection, wxT("Project file was not closed at shutdown"));
|
||||
}
|
||||
|
||||
static const AudacityProject::AttachedObjects::RegisteredFactory
|
||||
sConnectionPtrKey{
|
||||
|
@@ -254,7 +254,6 @@ ProjectFileIO::ProjectFileIO(AudacityProject &project)
|
||||
|
||||
ProjectFileIO::~ProjectFileIO()
|
||||
{
|
||||
wxASSERT_MSG(!CurrConn(), wxT("Project file was not closed at shutdown"));
|
||||
}
|
||||
|
||||
sqlite3 *ProjectFileIO::DB()
|
||||
|
Reference in New Issue
Block a user