mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-14 08:33:46 +01:00
Additional check for event null pointer in sc_zoom
This commit is contained in:
parent
9712257b62
commit
cea37334ce
@ -1382,7 +1382,7 @@ sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t*
|
|||||||
zathura_document_set_scale(zathura->document, t / 100.0);
|
zathura_document_set_scale(zathura->document, t / 100.0);
|
||||||
}
|
}
|
||||||
} else if (argument->n == ZOOM_SMOOTH) {
|
} else if (argument->n == ZOOM_SMOOTH) {
|
||||||
const double dy = event->y;
|
const double dy = (event != NULL) ? event->y : 1.0;
|
||||||
zathura_document_set_scale(zathura->document, old_zoom + zoom_step * dy);
|
zathura_document_set_scale(zathura->document, old_zoom + zoom_step * dy);
|
||||||
} else {
|
} else {
|
||||||
zathura_document_set_scale(zathura->document, 1.0);
|
zathura_document_set_scale(zathura->document, 1.0);
|
||||||
|
Loading…
Reference in New Issue
Block a user