diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-12-19 12:28:46 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-12-19 12:28:46 +0100 |
commit | a4db99ff1e26b03e762c4b63b9867ac6e2da6dcd (patch) | |
tree | b090e1b6ff9c3c0e9cb51e033e22db10a8709e23 /gtk/gtkprintoperation-unix.c | |
parent | 0b4af241b60cb63cccc010bc7c94ab2c97134730 (diff) | |
download | gtk+-a4db99ff1e26b03e762c4b63b9867ac6e2da6dcd.tar.gz |
Fix a crash on print preview
There's no printer when doing print preview so it's not possible to get
its hard margins.
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r-- | gtk/gtkprintoperation-unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c index 4ac60de879..f12ab01b37 100644 --- a/gtk/gtkprintoperation-unix.c +++ b/gtk/gtkprintoperation-unix.c @@ -547,7 +547,7 @@ finish_print (PrintResponseData *rdata, if (gtk_print_settings_get_number_up (settings) < 2) { - if (gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right)) + if (printer && gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right)) _gtk_print_context_set_hard_margins (priv->print_context, top, bottom, left, right); } else |