diff options
author | Benjamin Otte <otte@gnome.org> | 2008-11-03 23:07:46 +0100 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2008-11-03 23:07:46 +0100 |
commit | 9666246059792a2ab3b357eacfd62260925daddd (patch) | |
tree | 7793a31bb0f8e3f67c7ebcaa9b974cff4b64443d | |
parent | f935532759ade1a3b06bcc94f9a88da7bb5e797a (diff) |
fix crash when calling gotoAndPlay (label) on a script-created movieclip
-rw-r--r-- | swfdec/swfdec_sprite_movie_as.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/swfdec/swfdec_sprite_movie_as.c b/swfdec/swfdec_sprite_movie_as.c index b1bb452e..191f83e0 100644 --- a/swfdec/swfdec_sprite_movie_as.c +++ b/swfdec/swfdec_sprite_movie_as.c @@ -470,6 +470,7 @@ swfdec_sprite_movie_do_goto (SwfdecSpriteMovie *movie, SwfdecAsValue *target) int frame; g_return_if_fail (SWFDEC_IS_SPRITE_MOVIE (movie)); + g_return_if_fail (movie->sprite != NULL); g_return_if_fail (SWFDEC_IS_AS_VALUE (target)); if (SWFDEC_AS_VALUE_IS_STRING (target)) { @@ -498,6 +499,9 @@ swfdec_sprite_movie_gotoAndPlay (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, "v", &val); + if (movie->sprite == NULL) + return; + swfdec_sprite_movie_do_goto (movie, &val); movie->playing = TRUE; } @@ -512,6 +516,9 @@ swfdec_sprite_movie_gotoAndStop (SwfdecAsContext *cx, SwfdecAsObject *object, SWFDEC_AS_CHECK (SWFDEC_TYPE_SPRITE_MOVIE, (gpointer)&movie, "v", &val); + if (movie->sprite == NULL) + return; + swfdec_sprite_movie_do_goto (movie, &val); movie->playing = FALSE; } |