[libchamplain/libchamplain-0-4] Fix polygon demo crash on startup



commit 853a50b554ee69689c64ce72e5a589a9bc722cca
Author: JiÅ?í Techet <techet gmail com>
Date:   Sun May 23 14:03:17 2010 +0200

    Fix polygon demo crash on startup
    
    Rather workaround, the proper fix is in 0.6
    
    Signed-off-by: JiÅ?í Techet <techet gmail com>

 champlain/champlain-view.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index e9c6d17..e3fef74 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -330,7 +330,7 @@ update_viewport (ChamplainView *view,
     g_object_notify (G_OBJECT (view), "latitude");
 }
 
-static void 
+static void
 panning_completed (TidyFingerScroll *scroll,
                    ChamplainView *view)
 {
@@ -430,7 +430,7 @@ draw_polygon (ChamplainView *view, ChamplainPolygon *polygon)
   cairo_t *cr;
   ChamplainViewPrivate *priv = view->priv;
 
-  if (polygon->priv->visible == FALSE)
+  if (polygon->priv->actor == NULL || polygon->priv->visible == FALSE)
     return;
 
   cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (polygon->priv->actor));
@@ -633,7 +633,7 @@ champlain_view_get_property (GObject *object,
             CLAMP (priv->longitude, CHAMPLAIN_MIN_LONG, CHAMPLAIN_MAX_LONG));
         break;
       case PROP_LATITUDE:
-        g_value_set_double (value, 
+        g_value_set_double (value,
             CLAMP (priv->latitude, CHAMPLAIN_MIN_LAT, CHAMPLAIN_MAX_LAT));
         break;
       case PROP_ZOOM_LEVEL:



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