]> err.no Git - libchamplain/commitdiff
Fix a ton of criticals and warnings if the error tile image is not found.
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Mon, 16 Mar 2009 17:49:58 +0000 (19:49 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Mon, 16 Mar 2009 17:49:58 +0000 (19:49 +0200)
champlain/champlain-network-map-source.c

index 04788e50158c9c5b88e82cbc1fabe922f3789989..bad816589cb2b46cc410b4d59433ff62de391429 100644 (file)
@@ -351,9 +351,16 @@ static void
 create_error_tile (ChamplainTile* tile)
 {
   ClutterActor *actor;
+  ClutterColor red = { 0xff, 0x00, 0x00, 0xff };
+
   actor = clutter_texture_new_from_file (DATADIR "/champlain/error.svg", NULL);
   if (!actor)
-    return;
+  {
+    /* Just in case the image is not found, put some red.  This should not
+     * happen if libchamplain is installed correctly. */
+    actor = clutter_rectangle_new_with_color (&red);
+    clutter_actor_set_size (actor , 256, 256);
+  }
 
   champlain_tile_set_actor (tile, actor);
   clutter_actor_show (actor);