From 4db5b2d2296cea4df977967ffb4291e377473e11 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 16 Mar 2009 19:49:58 +0200 Subject: [PATCH] Fix a ton of criticals and warnings if the error tile image is not found. --- champlain/champlain-network-map-source.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.39.5