summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2012-10-12 12:32:03 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-10-16 11:51:53 -0400
commit7a92ea494cc1abe4675090241dbe87674b339fea (patch)
tree9830a050ddc853af62024122650cce485ab75c42 /src/util.c
parent5e48a85e6b88f42852d2b2e4f70a3dc6a681c8ba (diff)
util: Check result of weston_surface_animation_run.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 4390e2e2..306c7971 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;