aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-01-13 12:53:51 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-01-13 12:53:51 +0100
commit07d9e3fae5af09b69e588e182453048a88cf03b7 (patch)
treee6d480e4afa0a2631dc3a74b032eb277b0973138
parent7911b9a07699d3e5005386158c97f74437753fc6 (diff)
downloadd2tk.lv2-07d9e3fae5af09b69e588e182453048a88cf03b7.tar.xz
Squashed 'subprojects/d2tk/' changes from a8660e544..9df04584f
9df04584f core: handle out-of-memory in widget_begin. git-subtree-dir: subprojects/d2tk git-subtree-split: 9df04584f4c8b22083a26c324583253f3a02bfd6
-rw-r--r--VERSION2
-rw-r--r--src/core.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/VERSION b/VERSION
index 04a2332..64acfd0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.1177
+0.1.1179
diff --git a/src/core.c b/src/core.c
index 0b1d532..3e9ee4b 100644
--- a/src/core.c
+++ b/src/core.c
@@ -933,7 +933,11 @@ D2TK_API d2tk_widget_t *
d2tk_core_widget_begin(d2tk_core_t *core, uint64_t hash, d2tk_widget_t *widget)
{
widget->body = _d2tk_core_get_memcache(core, hash);
- assert(widget->body);
+
+ if(!widget->body) // out-of-memory
+ {
+ return NULL;
+ }
if(*widget->body) // bluntly use cached widget instruction buffer
{