mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
jack: guard again append without an event in the buffer
This commit is contained in:
parent
7dacdc8cc8
commit
16ba0ef59b
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue