[cogl] msaa: print GError message on onscreen alloc failure



commit 995f4cd0198e0113b4f990228ac13fff806a740e
Author: Robert Bragg <robert linux intel com>
Date:   Tue Apr 10 19:20:21 2012 +0100

    msaa: print GError message on onscreen alloc failure
    
    If we fail to allocate the onscreen framebuffer when first requesting 4x
    msaa then we now print the GError message.
    
    Reviewed-by: Neil Roberts <neil linux intel com>

 examples/cogl-msaa.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/examples/cogl-msaa.c b/examples/cogl-msaa.c
index ced6a3f..0b1b590 100644
--- a/examples/cogl-msaa.c
+++ b/examples/cogl-msaa.c
@@ -47,9 +47,9 @@ main (int argc, char **argv)
 
     if (!cogl_framebuffer_allocate (fb, &error))
       {
-        g_error_free (error);
         fprintf (stderr, "Failed to allocate 4x msaa offscreen framebuffer, "
-                 "disabling msaa for onscreen rendering\n");
+                 "disabling msaa for onscreen rendering: %s\n", error->message);
+        g_error_free (error);
         cogl_framebuffer_set_samples_per_pixel (fb, 0);
 
         error = NULL;



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