mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 11:16:00 +01:00
Don't segfault if reloaded document has less pages.
This commit is contained in:
parent
d2503b49c3
commit
382f5e7618
1 changed files with 4 additions and 1 deletions
|
@ -2205,7 +2205,10 @@ sc_reload(Argument* argument)
|
|||
gtk_adjustment_set_value(hadjustment, ha);
|
||||
g_static_mutex_unlock(&(Zathura.Lock.pdf_obj_lock));
|
||||
|
||||
draw(page);
|
||||
if (page >= Zathura.PDF.number_of_pages - 1)
|
||||
page = Zathura.PDF.number_of_pages - 1;
|
||||
Zathura.PDF.page_number = page;
|
||||
draw(Zathura.PDF.page_number);
|
||||
|
||||
if(path)
|
||||
free(path);
|
||||
|
|
Loading…
Reference in a new issue