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