Commit e2105bee authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add checks for pointers before using them

This probably doesn't solve the bug, but I've noticed that sometimes
when working with larger images, a tool cannot access the current
node, so that might be one reason for this crash to happen.

parent 82484d03
......@@ -271,6 +271,8 @@ void KisToolMove::commitChanges()
void KisToolMove::moveDiscrete(MoveDirection direction, bool big)
if (mode() == KisTool::PAINT_MODE) return; // Don't interact with dragging
if (!currentNode()) return;
if (!image()) return;
if (!currentNode()->isEditable()) return; // Don't move invisible nodes
if (startStrokeImpl(MoveSelectedLayer, 0)) {
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