From a0a5cb465e39d5eae5a100f834bb80cc949b3233 Mon Sep 17 00:00:00 2001 From: Igor Zinken Date: Fri, 15 Jan 2021 09:29:43 +0100 Subject: [PATCH] Caught null pointer exception on outline rendering --- src/components/ui/zcanvas/interaction-pane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/zcanvas/interaction-pane.js b/src/components/ui/zcanvas/interaction-pane.js index 4f7d2c6..766c78a 100644 --- a/src/components/ui/zcanvas/interaction-pane.js +++ b/src/components/ui/zcanvas/interaction-pane.js @@ -287,7 +287,7 @@ function drawSelectionOutline( ctx, zCanvas, viewport, selection, color, current ); }); // for lasso selections, draw line to current cursor position - if ( currentPosition?.x !== 0 && currentPosition?.y !== 0 ) { + if ( currentPosition && currentPosition.x !== 0 && currentPosition.y !== 0 ) { ctx.lineTo(( .5 + currentPosition.x ) << 0, ( .5 + currentPosition.y ) << 0 ); } ctx.stroke();