aboutsummaryrefslogtreecommitdiff
path: root/monitors_midi_pianoroll.c
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-09 19:27:33 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-09 19:27:33 +0200
commit71e32e261639879c7d0f9e17c7b7ae2173234af6 (patch)
tree760a805f360dd271a2224216e344af019dd2ea98 /monitors_midi_pianoroll.c
parentd05a4c4029f570c78b45cb23146546c466e5a6ec (diff)
downloadmonitors.lv2-71e32e261639879c7d0f9e17c7b7ae2173234af6.tar.xz
properly return when out-of-memory.
Diffstat (limited to 'monitors_midi_pianoroll.c')
-rw-r--r--monitors_midi_pianoroll.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/monitors_midi_pianoroll.c b/monitors_midi_pianoroll.c
index b72e3cf..1844716 100644
--- a/monitors_midi_pianoroll.c
+++ b/monitors_midi_pianoroll.c
@@ -136,6 +136,7 @@ _render(plughandle_t *handle, int64_t frames)
|| !lv2_canvas_forge_save(forge, urid) )
{
_out_of_memory(handle);
+ return;
}
if(handle->state.hflip || handle->state.vflip)
@@ -151,6 +152,7 @@ _render(plughandle_t *handle, int64_t frames)
if( !lv2_canvas_forge_transform(forge, urid, xx, xy, x0, yy, yx, y0) )
{
_out_of_memory(handle);
+ return;
}
}
@@ -163,6 +165,7 @@ _render(plughandle_t *handle, int64_t frames)
|| !lv2_canvas_forge_translate(forge, urid, -0.5f, -0.5f) )
{
_out_of_memory(handle);
+ return;
}
}
@@ -194,6 +197,7 @@ _render(plughandle_t *handle, int64_t frames)
|| !lv2_canvas_forge_stroke(forge, urid) )
{
_out_of_memory(handle);
+ return;
}
}
@@ -228,6 +232,7 @@ _render(plughandle_t *handle, int64_t frames)
|| !lv2_canvas_forge_stroke(forge, urid) )
{
_out_of_memory(handle);
+ return;
}
}
else
@@ -240,6 +245,7 @@ _render(plughandle_t *handle, int64_t frames)
if( !lv2_canvas_forge_restore(forge, urid) )
{
_out_of_memory(handle);
+ return;
}
lv2_atom_forge_pop(forge, &frame);