cairo-perf - Check that the surface is created.

Exit(1) if we fail to create the target surface.
This commit is contained in:
Chris Wilson 2007-04-18 14:12:20 +01:00
parent 7131f4e6ae
commit 383e9d5368

View file

@ -345,6 +345,13 @@ main (int argc, char *argv[])
perf.size, perf.size,
CAIRO_BOILERPLATE_MODE_PERF,
&target->closure);
if (surface == NULL) {
fprintf (stderr,
"Error: Failed to create target surface: %s",
target->name);
exit (1);
}
cairo_perf_timer_set_synchronize (target->synchronize,
target->closure);