From: Pierre-Luc Beaudoin Date: Sun, 22 Mar 2009 19:14:33 +0000 (+0200) Subject: Fix virtual function X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e47ffcd55aa4e34b3883502b94da72537a307bc1;p=libchamplain Fix virtual function possibly fix a crasher happening only when zooming past level 8 --- diff --git a/champlain/champlain-map-source.c b/champlain/champlain-map-source.c index 62adcd6..4bb4230 100644 --- a/champlain/champlain-map-source.c +++ b/champlain/champlain-map-source.c @@ -34,6 +34,9 @@ #include #include +void champlain_map_source_real_get_tile (ChamplainMapSource *map_source, + ChamplainView *view, ChamplainZoomLevel *level, ChamplainTile *tile); + enum { /* normal signals */ @@ -168,7 +171,7 @@ champlain_map_source_class_init (ChamplainMapSourceClass *klass) object_class->get_property = champlain_map_source_get_property; object_class->set_property = champlain_map_source_set_property; - klass->get_tile = champlain_map_source_get_tile; + klass->get_tile = champlain_map_source_real_get_tile; /** * ChamplainMapSource:name: @@ -349,9 +352,20 @@ champlain_map_source_get_tile (ChamplainMapSource *map_source, ChamplainZoomLevel *zoom_level, ChamplainTile *tile) { + g_return_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source)); + CHAMPLAIN_MAP_SOURCE_GET_CLASS (map_source)->get_tile (map_source, view, zoom_level, tile); } +void +champlain_map_source_real_get_tile (ChamplainMapSource *map_source, + ChamplainView *view, + ChamplainZoomLevel *zoom_level, + ChamplainTile *tile) +{ + g_error ("Should not be reached"); +} + gdouble champlain_map_source_get_longitude (ChamplainMapSource *map_source, gint zoom_level,