diff options
author | Jiří Techet <techet@gmail.com> | 2010-05-23 14:03:17 +0200 |
---|---|---|
committer | Jiří Techet <techet@gmail.com> | 2010-05-23 14:03:17 +0200 |
commit | 853a50b554ee69689c64ce72e5a589a9bc722cca (patch) | |
tree | e73f356159a4d08342cbc2ba318814296fb0098a | |
parent | 1468b2dc0a81b2a76cee5597b61abe3b14160db4 (diff) | |
download | libchamplain-853a50b554ee69689c64ce72e5a589a9bc722cca.tar.gz |
Fix polygon demo crash on startup
Rather workaround, the proper fix is in 0.6
Signed-off-by: Jiří Techet <techet@gmail.com>
-rw-r--r-- | 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: |