Commit a4db99ff authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

Fix a crash on print preview

There's no printer when doing print preview so it's not possible to get
its hard margins.
parent 0b4af241
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment