Skip to content

Commit 45f2a79

Browse files
authored
Fix a nullpointer dereference during legato mode (#1607)
1 parent ea5df79 commit 45f2a79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/synth/fluid_synth_monopoly.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ int fluid_synth_noteoff_mono_LOCAL(fluid_synth_t *synth, int chan, int key)
410410
fluid_channel_breath_msb(channel))
411411
{
412412
/* legato playing detection */
413-
if(channel->mode & FLUID_CHANNEL_LEGATO_PLAYING)
413+
if (channel->mode & FLUID_CHANNEL_LEGATO_PLAYING && channel->preset != NULL)
414414
{
415415
/* the list contains others notes */
416416
if(i_prev >= 0)

0 commit comments

Comments
 (0)