aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-01-13 12:53:48 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-01-13 12:53:48 +0100
commit314e9071fe5339fc3c7addf61b23c6042a216934 (patch)
treee6d480e4afa0a2631dc3a74b032eb277b0973138
parentfc0ddce263e571a5de1cf3190abb46e30ac33b3e (diff)
downloadsynthpod-314e9071fe5339fc3c7addf61b23c6042a216934.tar.xz
Squashed 'subprojects/d2tk/' changes from a8660e54..9df04584
9df04584 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 04a23327..64acfd0c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.1177
+0.1.1179
diff --git a/src/core.c b/src/core.c
index 0b1d5323..3e9ee4be 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
{