summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-20 10:12:24 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-20 10:12:24 -0700
commit03b2e565503d383acc5f2867404cc39c0a2add80 (patch)
tree3c1a0e152303319360f8b94cca14b49046204cb7 /print.c
parent15e3b5f4414d320dbace1bd3913b07d35bd9e9ee (diff)
parent9a853c564c9bb47bc91e74d54d69443eeb4c3449 (diff)
downloadsubsurface-03b2e565503d383acc5f2867404cc39c0a2add80.tar.gz
Merge git://github.com/sirowain/subsurface
* git://github.com/sirowain/subsurface: Fix Segmentation fault when trying to print an empty plot. Provide an icon for subsurface. Added a comment about libusb dependency in Makefile.
Diffstat (limited to 'print.c')
-rw-r--r--print.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/print.c b/print.c
index 0fe958a00..57cac8075 100644
--- a/print.c
+++ b/print.c
@@ -22,7 +22,8 @@ static void draw_page(GtkPrintOperation *operation,
h = gtk_print_context_get_height(context);
/* Do the profile on the top half of the page.. */
- plot(&gc, w, h/2, current_dive);
+ if (current_dive)
+ plot(&gc, w, h/2, current_dive);
pango_cairo_show_layout(cr,layout);
g_object_unref(layout);