From b2451c4d097ca9a76658257c0ce975fbb1338452 Mon Sep 17 00:00:00 2001 From: neldoreth Date: Mon, 12 Apr 2010 17:36:58 +0200 Subject: [PATCH] Check for opened document in cb_draw --- zathura.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zathura.c b/zathura.c index a6112db..25f7f62 100644 --- a/zathura.c +++ b/zathura.c @@ -2729,6 +2729,9 @@ cb_destroy(GtkWidget* widget, gpointer data) gboolean cb_draw(GtkWidget* widget, GdkEventExpose* expose, gpointer data) { + if(!Zathura.PDF.document) + return FALSE; + int page_id = Zathura.PDF.page_number; if(page_id < 0 || page_id > Zathura.PDF.number_of_pages)