mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 21:16:00 +01:00
Check for opened document in cb_draw
This commit is contained in:
parent
e31857a082
commit
e5afcbd01e
1 changed files with 3 additions and 0 deletions
|
@ -2729,6 +2729,9 @@ cb_destroy(GtkWidget* widget, gpointer data)
|
||||||
|
|
||||||
gboolean cb_draw(GtkWidget* widget, GdkEventExpose* expose, gpointer data)
|
gboolean cb_draw(GtkWidget* widget, GdkEventExpose* expose, gpointer data)
|
||||||
{
|
{
|
||||||
|
if(!Zathura.PDF.document)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
int page_id = Zathura.PDF.page_number;
|
int page_id = Zathura.PDF.page_number;
|
||||||
|
|
||||||
if(page_id < 0 || page_id > Zathura.PDF.number_of_pages)
|
if(page_id < 0 || page_id > Zathura.PDF.number_of_pages)
|
||||||
|
|
Loading…
Reference in a new issue