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
This commit is contained in:
Owen W. Taylor 2011-03-13 14:26:01 -04:00
parent bdebaa986b
commit d3703516d9
3 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ main(int argc, char **argv)
clutter_x11_disable_event_retrieval (); clutter_x11_disable_event_retrieval ();
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
g_error ("failed to initialize Clutter"); return 1;
gdk_window_add_filter (NULL, event_filter, NULL); gdk_window_add_filter (NULL, event_filter, NULL);

View File

@ -427,7 +427,7 @@ main (int argc, char **argv)
StThemeContext *context; StThemeContext *context;
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
g_error ("failed to initialize clutter"); return 1;
theme = st_theme_new ("st/test-theme.css", theme = st_theme_new ("st/test-theme.css",
NULL, NULL); NULL, NULL);

View File

@ -32,7 +32,7 @@ int main (int argc, char **argv)
g_thread_init (NULL); g_thread_init (NULL);
gst_init (&argc, &argv); gst_init (&argc, &argv);
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) 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 (&red, "red");
clutter_color_from_string (&green, "green"); clutter_color_from_string (&green, "green");