From: Pierre-Luc Beaudoin Date: Mon, 16 Mar 2009 17:49:58 +0000 (+0200) Subject: Fix a ton of criticals and warnings if the error tile image is not found. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4db5b2d2296cea4df977967ffb4291e377473e11;p=libchamplain Fix a ton of criticals and warnings if the error tile image is not found. --- diff --git a/champlain/champlain-network-map-source.c b/champlain/champlain-network-map-source.c index 04788e5..bad8165 100644 --- a/champlain/champlain-network-map-source.c +++ b/champlain/champlain-network-map-source.c @@ -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);