mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-05 22:59:29 +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:
parent
676af8ce38
commit
5bc2cb991f
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user