mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 12:55:59 +01:00
Fix regression from a1fe0f0b
In some cases sc_reload could still segfault. This should fix it.
This commit is contained in:
parent
e395528e0d
commit
9f0be39db6
1 changed files with 6 additions and 4 deletions
10
zathura.c
10
zathura.c
|
@ -2205,10 +2205,12 @@ sc_reload(Argument* argument)
|
|||
gtk_adjustment_set_value(hadjustment, ha);
|
||||
g_static_mutex_unlock(&(Zathura.Lock.pdf_obj_lock));
|
||||
|
||||
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 (Zathura.PDF.number_of_pages != 0) {
|
||||
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