[gnome-shell] Fix handling of clutter_init() failures
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix handling of clutter_init() failures
- Date: Sun, 13 Mar 2011 18:31:40 +0000 (UTC)
commit d3703516d979ce98c95ae66979f4ded8606eb8f1
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Mar 13 14:26:01 2011 -0400
Fix handling of clutter_init() failures
clutter_init() fails under normal circumstances like
being unable to open a display connection, so it shouldn't
be handled with g_error() producing a core dump.
Clutter consistently produces an error message when
clutter_init() fails, so we don't need to print out any
error message.
https://bugzilla.gnome.org/show_bug.cgi?id=643910
src/run-js-test.c | 2 +-
src/st/test-theme.c | 2 +-
src/test-recorder.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/run-js-test.c b/src/run-js-test.c
index 7ffa62c..27cd400 100644
--- a/src/run-js-test.c
+++ b/src/run-js-test.c
@@ -78,7 +78,7 @@ main(int argc, char **argv)
clutter_x11_disable_event_retrieval ();
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
- g_error ("failed to initialize Clutter");
+ return 1;
gdk_window_add_filter (NULL, event_filter, NULL);
diff --git a/src/st/test-theme.c b/src/st/test-theme.c
index aeb8ade..db7f747 100644
--- a/src/st/test-theme.c
+++ b/src/st/test-theme.c
@@ -427,7 +427,7 @@ main (int argc, char **argv)
StThemeContext *context;
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
- g_error ("failed to initialize clutter");
+ return 1;
theme = st_theme_new ("st/test-theme.css",
NULL, NULL);
diff --git a/src/test-recorder.c b/src/test-recorder.c
index 2a684e1..655c887 100644
--- a/src/test-recorder.c
+++ b/src/test-recorder.c
@@ -32,7 +32,7 @@ int main (int argc, char **argv)
g_thread_init (NULL);
gst_init (&argc, &argv);
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
- g_error ("failed to initialize Clutter");
+ return 1;
clutter_color_from_string (&red, "red");
clutter_color_from_string (&green, "green");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]