[libchamplain] Add checks if adjustments exist when stopping animation



commit 9033f82ff09a426ec393a33b7befff3c7f22130c
Author: Jiří Techet <techet gmail com>
Date:   Fri Dec 6 00:51:49 2013 +0100

    Add checks if adjustments exist when stopping animation
    
    Necessary when dispose() is called before the stop method when destroying
    the objects.

 champlain/champlain-viewport.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/champlain/champlain-viewport.c b/champlain/champlain-viewport.c
index 2bde1f0..4c7f107 100644
--- a/champlain/champlain-viewport.c
+++ b/champlain/champlain-viewport.c
@@ -151,8 +151,11 @@ champlain_viewport_stop (ChamplainViewport *viewport)
 {
   ChamplainViewportPrivate *priv = CHAMPLAIN_VIEWPORT (viewport)->priv;
 
-  champlain_adjustment_interpolate_stop (priv->hadjustment);
-  champlain_adjustment_interpolate_stop (priv->vadjustment);
+  if (priv->hadjustment)
+    champlain_adjustment_interpolate_stop (priv->hadjustment);
+    
+  if (priv->vadjustment)
+    champlain_adjustment_interpolate_stop (priv->vadjustment);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]