mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 15:01:40 +00:00
Fix dereference before NULL check in defsfont/ramsfont (ticket #117)
Patch credit: surabhi-mishra
This commit is contained in:
parent
862314c134
commit
89898893b1
2 changed files with 2 additions and 2 deletions
|
@ -823,7 +823,7 @@ fluid_defpreset_noteon(fluid_defpreset_t* preset, fluid_synth_t* synth, int chan
|
|||
|
||||
/* make sure this instrument zone has a valid sample */
|
||||
sample = fluid_inst_zone_get_sample(inst_zone);
|
||||
if (fluid_sample_in_rom(sample) || (sample == NULL)) {
|
||||
if ((sample == NULL) || fluid_sample_in_rom(sample)) {
|
||||
inst_zone = fluid_inst_zone_next(inst_zone);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -914,7 +914,7 @@ fluid_rampreset_noteon (fluid_rampreset_t* preset, fluid_synth_t* synth, int cha
|
|||
|
||||
/* make sure this instrument zone has a valid sample */
|
||||
sample = fluid_inst_zone_get_sample(inst_zone);
|
||||
if (fluid_sample_in_rom(sample) || (sample == NULL)) {
|
||||
if ((sample == NULL) || fluid_sample_in_rom(sample)) {
|
||||
inst_zone = fluid_inst_zone_next(inst_zone);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue