diff --git a/src/kits/midi/SoftSynth.cpp b/src/kits/midi/SoftSynth.cpp index 84af47497f..7ff6e9b28a 100644 --- a/src/kits/midi/SoftSynth.cpp +++ b/src/kits/midi/SoftSynth.cpp @@ -124,10 +124,12 @@ BSoftSynth::SetInstrumentsFile(const char* path) if (path == NULL) return B_BAD_VALUE; + if (!BEntry(path).Exists()) + return B_FILE_NOT_FOUND; + if (IsLoaded()) Unload(); - // TODO: Check for file existence ? fInstrumentsFile = strdup(path); return B_OK; }