Commit b59f37bc authored by Max Kellermann's avatar Max Kellermann

db/simple/Directory: close the Database in destructor

Fixes assertion failure.
parent cf2d171c
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment