BSoftSynth::SetInstrumentsFile(): Check if file exists.

This commit is contained in:
Stefano Ceccherini 2014-09-20 19:57:03 +02:00
parent c0622eb3d3
commit f511367b33

View File

@ -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;
}