ADLMIDI: Don't even try to load custom bank if disabled

This commit is contained in:
Wohlstand 2020-09-29 01:57:31 +03:00 committed by Christoph Oelckers
parent 14c771f609
commit 61f54f9487

View file

@ -126,6 +126,8 @@ ADLMIDIDevice::~ADLMIDIDevice()
int ADLMIDIDevice::LoadCustomBank(const ADLConfig *config)
{
const char *bankfile = config->adl_custom_bank.c_str();
if(!config->adl_use_custom_bank)
return 0;
if(!*bankfile)
return 0;
return (adl_openBankFile(Renderer, bankfile) == 0);