diff options
Diffstat (limited to 'examples/userfont.c')
-rw-r--r-- | examples/userfont.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/userfont.c b/examples/userfont.c index 930ad2cf..3c8735c7 100644 --- a/examples/userfont.c +++ b/examples/userfont.c @@ -344,7 +344,12 @@ main (int argc, char **argv) g_object_unref (layout); /* Write out the surface as PNG */ +#ifdef CAIRO_HAS_PNG_FUNCTIONS status = cairo_surface_write_to_png (surface, filename); +#else + status = CAIRO_STATUS_PNG_ERROR; /* Not technically correct, but... */ +#endif + cairo_surface_destroy (surface); if (status != CAIRO_STATUS_SUCCESS) |