OPL: fix possible crash

This commit is contained in:
tildearrow 2022-05-03 14:04:38 -05:00
parent 4c9b172b50
commit 978b0798e5

View file

@ -940,6 +940,7 @@ void* DivPlatformOPL::getChanState(int ch) {
} }
DivDispatchOscBuffer* DivPlatformOPL::getOscBuffer(int ch) { DivDispatchOscBuffer* DivPlatformOPL::getOscBuffer(int ch) {
if (ch>=18) return NULL;
return oscBuf[ch]; return oscBuf[ch];
} }