mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-20 02:10:12 +00:00
Fix a crash on print preview
There's no printer when doing print preview so it's not possible to get its hard margins.
This commit is contained in:
parent
507bf6a85f
commit
acca24e9c1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user