[libchamplain/libchamplain-0-10] Add check for clutter_init() return value in demos
- From: JiÅÃ Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain/libchamplain-0-10] Add check for clutter_init() return value in demos
- Date: Fri, 2 Sep 2011 23:08:27 +0000 (UTC)
commit 3dd5af4b949c9f954e146b2d4887677a4cc3f1f7
Author: JiÅÃ Techet <techet gmail com>
Date: Fri Sep 2 22:50:22 2011 +0200
Add check for clutter_init() return value in demos
demos/animated-marker.c | 3 ++-
demos/launcher-vala.vala | 4 +++-
demos/launcher.c | 3 ++-
demos/minimal.c | 3 ++-
demos/polygons.c | 3 ++-
demos/url-marker.c | 3 ++-
6 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/demos/animated-marker.c b/demos/animated-marker.c
index 26c1c86..7f3fd6e 100644
--- a/demos/animated-marker.c
+++ b/demos/animated-marker.c
@@ -128,7 +128,8 @@ main (int argc, char *argv[])
GpsCallbackData callback_data;
g_thread_init (NULL);
- clutter_init (&argc, &argv);
+ if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+ return 1;
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 800, 600);
diff --git a/demos/launcher-vala.vala b/demos/launcher-vala.vala
index eeeb682..822a2b5 100644
--- a/demos/launcher-vala.vala
+++ b/demos/launcher-vala.vala
@@ -125,7 +125,9 @@ public class Launcher : GLib.Object
public static int main (string[] args)
{
- Clutter.init (ref args);
+ if (Clutter.init (ref args) != InitError.SUCCESS)
+ return 1;
+
var launcher = new Launcher ();
launcher.show ();
Clutter.main ();
diff --git a/demos/launcher.c b/demos/launcher.c
index 470c257..1f222d4 100644
--- a/demos/launcher.c
+++ b/demos/launcher.c
@@ -96,7 +96,8 @@ main (int argc,
gfloat width, total_width = 0;
g_thread_init (NULL);
- clutter_init (&argc, &argv);
+ if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+ return 1;
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 800, 600);
diff --git a/demos/minimal.c b/demos/minimal.c
index 4a66c6e..6ada0a9 100644
--- a/demos/minimal.c
+++ b/demos/minimal.c
@@ -24,7 +24,8 @@ main (int argc, char *argv[])
ClutterActor *actor, *stage;
g_thread_init (NULL);
- clutter_init (&argc, &argv);
+ if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+ return 1;
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 800, 600);
diff --git a/demos/polygons.c b/demos/polygons.c
index fb5ab30..996a61f 100644
--- a/demos/polygons.c
+++ b/demos/polygons.c
@@ -85,7 +85,8 @@ main (int argc,
gfloat width, total_width = 0;;
g_thread_init (NULL);
- clutter_init (&argc, &argv);
+ if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+ return 1;
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 800, 600);
diff --git a/demos/url-marker.c b/demos/url-marker.c
index 414c760..6e34d09 100644
--- a/demos/url-marker.c
+++ b/demos/url-marker.c
@@ -244,7 +244,8 @@ main (int argc, char *argv[])
SoupSession *session;
g_thread_init (NULL);
- clutter_init (&argc, &argv);
+ if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
+ return 1;
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 800, 600);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]