Check for opened document in cb_draw

This commit is contained in:
Moritz Lipp 2010-04-12 17:36:58 +02:00
parent e31857a082
commit e5afcbd01e

View file

@ -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)