From 947d2f2f1e5e42604afc09e037a8144e27e17af2 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 10 Oct 2007 11:16:31 +0200 Subject: [PATCH] don't fail when _check_block() is called with an empty frame This happens when we reach the endpc (== exitpc). We need to check blocks first so we can exit them properly. --- libswfdec/swfdec_as_frame.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c index 855e5bb2..3812313c 100644 --- a/libswfdec/swfdec_as_frame.c +++ b/libswfdec/swfdec_as_frame.c @@ -252,7 +252,8 @@ swfdec_as_frame_check_block (SwfdecAsFrame *frame) SwfdecAsFrameBlock *block; g_return_if_fail (SWFDEC_IS_AS_FRAME (frame)); - g_assert (frame->blocks->len > 0); + if (frame->blocks->len == 0) + return; block = &g_array_index (frame->blocks, SwfdecAsFrameBlock, frame->blocks->len - 1); block->func (frame, block->data); -- 2.11.4.GIT