mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 13:46:01 +01:00
Fix invalid zoom when opening document with "adjust-open width" option
This commit fixes attempt to set INFINITY zoom value when opening document for first time with "adjust-open width" option. In this case function zathura_document_get_document_size returns 0 width which leads to incorrect zoom calculation.
This commit is contained in:
parent
3a20080210
commit
582d3f6be3
1 changed files with 1 additions and 1 deletions
|
@ -1685,7 +1685,7 @@ adjust_view(zathura_t* zathura)
|
|||
zathura_document_get_document_size(zathura->document, &document_height, &document_width);
|
||||
zathura_document_get_viewport_size(zathura->document, &view_height, &view_width);
|
||||
|
||||
if (view_height == 0 || view_width == 0 || cell_height == 0 || cell_width == 0) {
|
||||
if (view_height == 0 || view_width == 0 || cell_height == 0 || cell_width == 0 || document_width == 0) {
|
||||
goto error_ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue