util: Check result of weston_surface_animation_run.
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Fri, 12 Oct 2012 10:32:03 +0000 (12:32 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 16 Oct 2012 15:51:53 +0000 (11:51 -0400)
src/util.c

index 4390e2e..306c797 100644 (file)
@@ -265,6 +265,9 @@ weston_slide_run(struct weston_surface *surface, float start, float stop,
 
        animation = weston_surface_animation_run(surface, start, stop,
                                                 slide_frame, done, data);
+       if (!animation)
+               return NULL;
+
        animation->spring.friction = 900;
        animation->spring.k = 300;