db/simple/Directory: close the Database in destructor
Fixes assertion failure.
This commit is contained in:
parent
cf2d171ccc
commit
b59f37bc0a
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@ ver 0.21.5 (not yet released)
|
|||
- fix "tagtypes disable" command
|
||||
* database
|
||||
- simple: fix assertion failure
|
||||
- fix assertion failures with mount points
|
||||
* input
|
||||
- buffer: fix crash bug when playing remote WAV file
|
||||
* tags
|
||||
|
|
|
@ -45,6 +45,11 @@ Directory::Directory(std::string &&_path_utf8, Directory *_parent) noexcept
|
|||
|
||||
Directory::~Directory() noexcept
|
||||
{
|
||||
if (mounted_database != nullptr) {
|
||||
mounted_database->Close();
|
||||
mounted_database.reset();
|
||||
}
|
||||
|
||||
songs.clear_and_dispose(Song::Disposer());
|
||||
children.clear_and_dispose(DeleteDisposer());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue