From 0374e59bce7359cfe9228d85bd403af11fa3a537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 19 Dec 2015 12:57:09 +0100 Subject: [PATCH] Fixed crash when zooming with no track loaded. --- src/track.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/track.cpp b/src/track.cpp index d9d2d8cd..3dd7b602 100644 --- a/src/track.cpp +++ b/src/track.cpp @@ -205,6 +205,9 @@ void Track::redraw() void Track::wheelEvent(QWheelEvent *event) { + if (_tracks.isEmpty()) + return; + QPointF pos = mapToScene(event->pos()); qreal scale = _scale;