tests: abort if clutter_init fails
This fixes segfaults when something goes wrong during init, but the test keeps going anyway. Except for test-easing and test-picking, these were fixed by sed magic: sed -i -s -e "s/clutter_init \?(&argc, &argv)/\ if (clutter_init (\&argc, \&argv) != CLUTTER_INIT_SUCCESS)\n\ return 1/" tests/*/*.c http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
This commit is contained in:
@ -14,7 +14,8 @@ test_shader_effects_main (int argc, char *argv[])
|
||||
ClutterActor *stage, *hand, *label, *rect;
|
||||
gchar *file;
|
||||
|
||||
clutter_init (&argc, &argv);
|
||||
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||
return 1;
|
||||
|
||||
/* Make a timeline */
|
||||
timeline = clutter_timeline_new (7692);
|
||||
|
Reference in New Issue
Block a user