diff --git a/lib/imagecanvas.cpp b/lib/imagecanvas.cpp index 7ab6cb4d..38107384 100644 --- a/lib/imagecanvas.cpp +++ b/lib/imagecanvas.cpp @@ -3225,9 +3225,6 @@ void ImageCanvas::hoverLeaveEvent(QHoverEvent *event) QQuickItem::hoverLeaveEvent(event); setContainsMouse(false); - - if (!mProject->hasLoaded()) - return; } void ImageCanvas::keyPressEvent(QKeyEvent *event) diff --git a/lib/tilecanvas.cpp b/lib/tilecanvas.cpp index 969f0b53..8a5cf9e5 100644 --- a/lib/tilecanvas.cpp +++ b/lib/tilecanvas.cpp @@ -575,7 +575,7 @@ void TileCanvas::hoverLeaveEvent(QHoverEvent *event) { ImageCanvas::hoverLeaveEvent(event); - if (!mTilesetProject->hasLoaded()) + if (!mTilesetProject || !mTilesetProject->hasLoaded()) return; // Don't reset the cursor position here, because it looks jarring.