diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-03-14 21:33:07 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-03-14 21:33:07 -0400 |
commit | df05d117a5c168fb90138d7d6bae760c1b2851af (patch) | |
tree | 128d53734e16723adbdee38762f9f5d57c9c5c1c /pango-view/viewer-main.c | |
parent | 3310b979c486e38182d89132d6b6b3e3d7ffb728 (diff) | |
download | pango-df05d117a5c168fb90138d7d6bae760c1b2851af.tar.gz |
Bug 523166 – pango-view opens display even when invoked with -q
Works now.
Diffstat (limited to 'pango-view/viewer-main.c')
-rw-r--r-- | pango-view/viewer-main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pango-view/viewer-main.c b/pango-view/viewer-main.c index 2b664682..611a4fb8 100644 --- a/pango-view/viewer-main.c +++ b/pango-view/viewer-main.c @@ -118,8 +118,13 @@ main (int argc, gpointer state = NULL; if (view->create_window) - window = view->create_window (instance, title, width, height); + { + window = view->create_window (instance, title, width, height); + if (!window) + goto no_display; + } + opt_display = FALSE; while (1) { state = view->display (instance, surface, window, width, height, state); @@ -132,7 +137,10 @@ main (int argc, if (view->destroy_window) view->destroy_window (instance, window); } - else +no_display: + + /* If failed to display natively, call ImageMagick */ + if (opt_display) { int fd; FILE *stream; |