texture: Warn when the file loaded from a ClutterScript can't be found
authorDamien Lespiau <damien.lespiau@intel.com>
Sun, 31 Oct 2010 16:49:40 +0000 (16:49 +0000)
committerDamien Lespiau <damien.lespiau@intel.com>
Mon, 1 Nov 2010 11:43:35 +0000 (11:43 +0000)
Telling the user about files not found when loading a ClutterScript with
ClutterTextures in it is very useful and can save a few minutes (or
hours) of frustation because it "does not work".

clutter/clutter-texture.c

index 0874b0d..87c3cf9 100644 (file)
@@ -1230,7 +1230,10 @@ clutter_texture_set_custom_property (ClutterScriptable *scriptable,
 
       path = clutter_script_lookup_filename (script, str);
       if (G_UNLIKELY (!path))
-        return;
+        {
+          g_warning ("Unable to find image %s", str);
+          return;
+        }
 
       error = NULL;
       clutter_texture_set_from_file (texture, path, &error);