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.
parent 3a200802
Pipeline #296 passed with stages
in 1 minute and 50 seconds
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment