[librsvg] rsvg-view: Better error message
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] rsvg-view: Better error message
- Date: Mon, 16 Apr 2012 17:12:08 +0000 (UTC)
commit 540f68dc2b6fe041d38b92e9a0077f5ce4d1bbe0
Author: Christian Persch <chpe gnome org>
Date: Mon Apr 16 19:05:03 2012 +0200
rsvg-view: Better error message
test-display.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/test-display.c b/test-display.c
index 2aa0ad5..42fad37 100644
--- a/test-display.c
+++ b/test-display.c
@@ -208,6 +208,12 @@ render_to_surface (ViewerCbInfo *info)
cairo_destroy (cr);
+ if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS) {
+ g_printerr ("Error while rendering image: %d\n", cairo_surface_status (surface));
+ cairo_surface_destroy (surface);
+ return NULL;
+ }
+
return surface;
}
@@ -778,11 +784,6 @@ main (int argc, char **argv)
g_printerr ("Unknown error while rendering image\n");
goto done;
}
- if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS) {
- g_printerr ("Error while rendering image: %d\n", cairo_surface_status (surface));
- cairo_surface_destroy (surface);
- goto done;
- }
retval = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]