BSoftSynth::SetInstrumentsFile(): Check if file exists.
This commit is contained in:
parent
c0622eb3d3
commit
f511367b33
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user