summaryrefslogtreecommitdiff
path: root/pango-view/viewer-main.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-03-14 21:33:07 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-03-14 21:33:07 -0400
commitdf05d117a5c168fb90138d7d6bae760c1b2851af (patch)
tree128d53734e16723adbdee38762f9f5d57c9c5c1c /pango-view/viewer-main.c
parent3310b979c486e38182d89132d6b6b3e3d7ffb728 (diff)
downloadpango-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.c12
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;