diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index 9f20f2948..359a7ae39 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -1980,7 +1980,12 @@ std::vector DivEngine::instrumentFromFile(const char* path, bool format=DIV_INSFORMAT_WOPL; } else if (extS==".wopn") { format=DIV_INSFORMAT_WOPN; - } + } else { + // unknown format + lastError="unknown instrument format"; + delete[] buf; + return ret; + } } switch (format) {