aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jalv.c b/src/jalv.c
index c6055ae..24a1008 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -751,8 +751,12 @@ jalv_update(Jalv* jalv)
zix_ring_read(jalv->plugin_to_ui, &ev, sizeof(ev));
// Resize read buffer if necessary
- jalv->ui_event_buf = realloc(jalv->ui_event_buf, ev.size);
- void* const buf = jalv->ui_event_buf;
+ void* const buf = realloc(jalv->ui_event_buf, ev.size);
+ if (!buf) {
+ return 12;
+ }
+
+ jalv->ui_event_buf = buf;
// Read event body
zix_ring_read(jalv->plugin_to_ui, buf, ev.size);