[gnome-builder] animation: handle frame clock not yet being available.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] animation: handle frame clock not yet being available.
- Date: Tue, 9 Sep 2014 01:26:57 +0000 (UTC)
commit 13e0ecbb134b1ada0f87d26354def578caa261c7
Author: Christian Hergert <christian hergert me>
Date: Mon Sep 8 18:26:22 2014 -0700
animation: handle frame clock not yet being available.
src/animation/gb-animation.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/animation/gb-animation.c b/src/animation/gb-animation.c
index 5598cae..431d877 100644
--- a/src/animation/gb-animation.c
+++ b/src/animation/gb-animation.c
@@ -305,11 +305,9 @@ gb_animation_get_offset (GbAnimation *animation)
priv = animation->priv;
- if (GTK_IS_WIDGET (priv->target))
- {
- frame_clock = gtk_widget_get_frame_clock (priv->target);
- frame_msec = gdk_frame_clock_get_frame_time (frame_clock) / 1000UL;
- }
+ if (GTK_IS_WIDGET (priv->target) &&
+ (frame_clock = gtk_widget_get_frame_clock (priv->target)))
+ frame_msec = gdk_frame_clock_get_frame_time (frame_clock) / 1000UL;
else
frame_msec = g_get_monotonic_time () / 1000UL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]