projects
/
apps
/
home
/
video-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2cb98c
)
[hb-view] Handle write_to_png errors
author
Behdad Esfahbod
<behdad@behdad.org>
Wed, 2 Mar 2011 06:01:03 +0000
(
01:01
-0500)
committer
Behdad Esfahbod
<behdad@behdad.org>
Wed, 2 Mar 2011 06:01:03 +0000
(
01:01
-0500)
src/hb-view.c
patch
|
blob
|
history
diff --git
a/src/hb-view.c
b/src/hb-view.c
index
dcb9571
..
5c0c48c
100644
(file)
--- a/
src/hb-view.c
+++ b/
src/hb-view.c
@@
-324,6
+324,8
@@
draw (void)
int
main (int argc, char **argv)
{
+ cairo_status_t status;
+
parse_opts (argc, argv);
FT_Init_FreeType (&ft_library);
@@
-336,7
+338,12
@@
main (int argc, char **argv)
draw ();
draw ();
- cairo_surface_write_to_png (surface, out_file);
+ status = cairo_surface_write_to_png (surface, out_file);
+ if (status != CAIRO_STATUS_SUCCESS) {
+ fprintf (stderr, "Failed to write output file `%s': %s\n",
+ out_file, cairo_status_to_string (status));
+ exit (1);
+ }
return 0;
}