]> err.no Git - libchamplain/commitdiff
Fix virtual function
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 22 Mar 2009 19:14:33 +0000 (21:14 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 22 Mar 2009 19:14:33 +0000 (21:14 +0200)
possibly fix a crasher happening only when zooming past level 8

champlain/champlain-map-source.c

index 62adcd623bef6cdc9157fd33eeb66c68b54b757a..4bb4230132154f8593c759db6a355b3eefe9bdcd 100644 (file)
@@ -34,6 +34,9 @@
 #include <math.h>
 #include <string.h>
 
+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,