From: fennecdjay Date: Fri, 18 Nov 2022 10:56:03 +0000 (+0100) Subject: :bug: Fix Event.signal X-Git-Tag: nightly~207^2~85 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c614be0613a4aae683d55779c67e50fdcdce33fe;p=gwion.git :bug: Fix Event.signal --- diff --git a/src/lib/event.c b/src/lib/event.c index eb7fe511..c21d3b9d 100644 --- a/src/lib/event.c +++ b/src/lib/event.c @@ -31,12 +31,11 @@ static INSTR(EventWait) { static MFUN(event_signal) { const Vector v = &EV_SHREDS(o); - const VM_Shred sh = (VM_Shred)vector_front(v); - if (sh) { - shredule(sh->tick->shreduler, sh, GWION_EPSILON); - vector_rem(v, 0); - release(sh->info->me, sh); - } + if(!vector_size(v)) return; + const VM_Shred sh = vector_front(v); + shredule(sh->tick->shreduler, sh, GWION_EPSILON); + vector_rem(v, 0); + release(sh->info->me, sh); } ANN void broadcast(const M_Object o) {