[clutter-gst] examples: bail if clutter_init fails



commit 2c40237d84de95e0810576b732b201fd5fd6a2c9
Author: �yvind Kolås <pippin linux intel com>
Date:   Mon Jun 6 12:00:56 2011 +0100

    examples: bail if clutter_init fails
    
    Never gcc is stricter about discared return values.

 examples/video-sink-navigation.c |    6 +++++-
 examples/video-sink.c            |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/examples/video-sink-navigation.c b/examples/video-sink-navigation.c
index a4670fa..f196e0d 100644
--- a/examples/video-sink-navigation.c
+++ b/examples/video-sink-navigation.c
@@ -82,7 +82,11 @@ main (int argc, char *argv[])
           return 1;
   }
 
-  clutter_init (&argc, &argv);
+  if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+    {
+      g_error ("Failed to initialize clutter\n");
+      return EXIT_FAILURE;
+    }
   gst_init (&argc, &argv);
 
   stage = clutter_stage_get_default ();
diff --git a/examples/video-sink.c b/examples/video-sink.c
index 2e12f8a..9442f80 100644
--- a/examples/video-sink.c
+++ b/examples/video-sink.c
@@ -80,7 +80,11 @@ main (int argc, char *argv[])
           return 1;
   }
 
-  clutter_init (&argc, &argv);
+  if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+    {
+      g_error ("Failed to initialize clutter\n");
+      return EXIT_FAILURE;
+    }
   gst_init (&argc, &argv);
 
   stage = clutter_stage_get_default ();



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