diff --git a/src/Audio/AbstractImporter.cpp b/src/Audio/AbstractImporter.cpp index 2e0ced0e3..28e185ebd 100644 --- a/src/Audio/AbstractImporter.cpp +++ b/src/Audio/AbstractImporter.cpp @@ -76,7 +76,10 @@ void AbstractImporter::doOpenFile(const std::string& filename) { } void AbstractImporter::close() { - if(isOpened()) doClose(); + if(isOpened()) { + doClose(); + CORRADE_INTERNAL_ASSERT(!isOpened()); + } } Buffer::Format AbstractImporter::format() const { diff --git a/src/Text/AbstractFont.cpp b/src/Text/AbstractFont.cpp index aa8e054e1..560e5385e 100644 --- a/src/Text/AbstractFont.cpp +++ b/src/Text/AbstractFont.cpp @@ -100,7 +100,10 @@ void AbstractFont::doOpenFile(const std::string& filename, const Float size) { } void AbstractFont::close() { - if(isOpened()) doClose(); + if(isOpened()) { + doClose(); + CORRADE_INTERNAL_ASSERT(!isOpened()); + } } UnsignedInt AbstractFont::glyphId(const char32_t character) { diff --git a/src/Trade/AbstractImporter.cpp b/src/Trade/AbstractImporter.cpp index e5e2eca1a..9d985b3dc 100644 --- a/src/Trade/AbstractImporter.cpp +++ b/src/Trade/AbstractImporter.cpp @@ -76,7 +76,10 @@ void AbstractImporter::doOpenFile(const std::string& filename) { } void AbstractImporter::close() { - if(isOpened()) doClose(); + if(isOpened()) { + doClose(); + CORRADE_INTERNAL_ASSERT(!isOpened()); + } } Int AbstractImporter::defaultScene() {