[gtk+/native-layout] Fix a crash on print preview
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Fix a crash on print preview
- Date: Sun, 4 Apr 2010 02:07:56 +0000 (UTC)
commit acca24e9c123729d45e7b3de348c434e489ff780
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sat Dec 19 12:28:46 2009 +0100
Fix a crash on print preview
There's no printer when doing print preview so it's not possible to get
its hard margins.
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 4ac60de..f12ab01 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]