mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 21:33:45 +01:00
Check for opened document in cb_draw
This commit is contained in:
parent
e31857a082
commit
e5afcbd01e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user