diff --git a/src/mpt/library/library.hpp b/src/mpt/library/library.hpp index 1b20277aff..09bf41fa14 100644 --- a/src/mpt/library/library.hpp +++ b/src/mpt/library/library.hpp @@ -283,6 +283,10 @@ class library { #endif + if (!hModule) { + return std::nullopt; + } + return library{hModule}; }