Fix crash when database is closed with asserts disabled
Fix crash when database is closed with asserts disabled

simolus3/drift,simolus3/moor,simolus3/moor,simolus3/moor,simolus3/moor,simolus3/drift,simolus3/moor,simolus3/drift,simolus3/drift,simolus3/drift,simolus3/moor,simolus3/moor,simolus3/drift,simolus3/drift