summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2007-07-11 15:57:49 +0200
committerBenjamin Otte <otte@gnome.org>2007-07-11 15:57:49 +0200
commitdf8e44d9c530cc042e791cde0786cbea30afa373 (patch)
tree2d44b0d66db1e306c82a27b6097e869818c7164f
parentf1b1b9d2d998bcc19cbd915b58a7f3d63a435a6b (diff)
fix segfault when rotation isn't a finite value
-rw-r--r--libswfdec/swfdec_movie.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c
index 53b47c24..5bde15ae 100644
--- a/libswfdec/swfdec_movie.c
+++ b/libswfdec/swfdec_movie.c
@@ -143,8 +143,10 @@ swfdec_movie_update_matrix (SwfdecMovie *movie)
d = movie->xscale / swfdec_matrix_get_xscale (&movie->content->transform);
e = movie->yscale / swfdec_matrix_get_yscale (&movie->content->transform);
cairo_matrix_scale (&movie->matrix, d, e);
- d = movie->rotation - swfdec_matrix_get_rotation (&movie->content->transform);
- cairo_matrix_rotate (&movie->matrix, d * G_PI / 180);
+ if (finite (movie->rotation)) {
+ d = movie->rotation - swfdec_matrix_get_rotation (&movie->content->transform);
+ cairo_matrix_rotate (&movie->matrix, d * G_PI / 180);
+ }
swfdec_matrix_ensure_invertible (&movie->matrix, &movie->inverse_matrix);
swfdec_movie_update_extents (movie);