PDFViewer: Ignore wheel events when there is no document loaded

This commit is contained in:
Andreas Kling 2021-05-18 21:24:46 +02:00
parent f808279769
commit 076018b74b
Notes: sideshowbarker 2024-07-18 17:48:31 +09:00

View file

@ -72,6 +72,9 @@ void PDFViewer::paint_event(GUI::PaintEvent& event)
void PDFViewer::mousewheel_event(GUI::MouseEvent& event)
{
if (!m_document)
return;
bool scrolled_down = event.wheel_delta() > 0;
if (event.ctrl()) {