[cogl/wip/rib/cogl-1.12: 29/142] cogl-crate: print GError message if texture load fails

commit 39a4b6e1d6b46cddf7827013f0857a64b6a31f93
Author: Robert Bragg <robert linux intel com>
Date:   Tue Apr 10 16:52:10 2012 +0100

    cogl-crate: print GError message if texture load fails
    If we fail to load the crate texture then we now print error->message to
    hopefully give more insight into the failure to the user.
    Reviewed-by: Neil Roberts <neil linux intel com>
    (cherry picked from commit b61b328f5167fb61f0a79979e3ce84cfd4d032e5)

 examples/cogl-crate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/cogl-crate.c b/examples/cogl-crate.c
index f0a7bbd..969dc5c 100644
--- a/examples/cogl-crate.c
+++ b/examples/cogl-crate.c
@@ -223,9 +223,9 @@ main (int argc, char **argv)
   data.texture = cogl_texture_new_from_file (COGL_EXAMPLES_DATA "crate.jpg",
-                                             NULL);
+                                             &error);
   if (!data.texture)
-    g_error ("Failed to load texture");
+    g_error ("Failed to load texture: %s", error->message);
   /* a CoglPipeline conceptually describes all the state for vertex
    * processing, fragment processing and blending geometry. When

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]