From 0b19a125bbcf2fe322c56c1c4e2af3a8d9c6f351 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 15 Dec 2019 12:50:53 +0100 Subject: [PATCH] :art: Check for NULL in UsrUgenTick --- src/lib/modules.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/modules.c b/src/lib/modules.c index 5c75eaa1..ff897dfa 100644 --- a/src/lib/modules.c +++ b/src/lib/modules.c @@ -248,6 +248,8 @@ static INSTR(UsrUGenTick) { const m_uint offset = !instr->m_val ? SZ_INT : 0; shred->reg -= SZ_INT*2 - offset; const M_Object o = *(M_Object*)(shred->reg + SZ_INT - offset); + if(!o) + Except(shred, "[NullPtrException]"); struct UUGen_ *uu = UGEN(o)->module.gen.data; if(uu->shred) free_vm_shred(uu->shred); -- 2.43.0