jack: guard again append without an event in the buffer

This commit is contained in:
Wim Taymans 2026-05-04 11:57:05 +02:00
parent 7dacdc8cc8
commit 16ba0ef59b

View file

@ -1569,6 +1569,8 @@ static inline int midi_event_append(void *port_buffer, const jack_midi_data_t *d
size_t old_size; size_t old_size;
uint8_t *old, *buf; uint8_t *old, *buf;
if (mb->event_count == 0)
return -ENOBUFS;
ev = &events[--mb->event_count]; ev = &events[--mb->event_count];
mb->write_pos -= ev->size; mb->write_pos -= ev->size;
old_size = ev->size; old_size = ev->size;