diff options
-rw-r--r-- | drawing.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drawing.lua b/drawing.lua index 587c24c..38e62c3 100644 --- a/drawing.lua +++ b/drawing.lua @@ -241,6 +241,10 @@ function Drawing.update(State) if State.lines.current_drawing == nil then return end local drawing = State.lines.current_drawing assert(drawing.mode == 'drawing') + if drawing.y == nil then + -- something invalidated all the y's; just wait for a draw + return + end local pmx, pmy = App.mouse_x(), App.mouse_y() local mx = Drawing.coord(pmx-State.left, State.width) local my = Drawing.coord(pmy-drawing.y, State.width) |