[libchamplain] Check whether timeout exists before destroying it
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Check whether timeout exists before destroying it
- Date: Tue, 7 May 2013 21:38:01 +0000 (UTC)
commit 99bf4aaa85bc0e873011b7f30ee9b1acebc74bc6
Author: Jiří Techet <techet gmail com>
Date: Tue May 7 22:20:14 2013 +0200
Check whether timeout exists before destroying it
champlain/champlain-view.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index c3381ea..cc3e284 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -331,9 +331,12 @@ panning_completed (G_GNUC_UNUSED ChamplainKineticScrollView *scroll,
ChamplainViewPrivate *priv = view->priv;
gdouble x, y;
-
- g_source_remove (priv->redraw_timeout);
- priv->redraw_timeout = 0;
+
+ if (priv->redraw_timeout != 0)
+ {
+ g_source_remove (priv->redraw_timeout);
+ priv->redraw_timeout = 0;
+ }
champlain_viewport_get_origin (CHAMPLAIN_VIEWPORT (priv->viewport), &x, &y);
@@ -1025,6 +1028,7 @@ champlain_view_init (ChamplainView *view)
priv->bg_offset_x = 0;
priv->bg_offset_y = 0;
priv->location_updated = FALSE;
+ priv->redraw_timeout = 0;
clutter_actor_set_background_color (CLUTTER_ACTOR (view), &color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]