From c902c563e355d9732c49fcf14cca61f583173f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Mon, 15 May 2023 13:58:48 -0300 Subject: [PATCH] Fix crash in app::tools::BaseInk::prepareForPointShape (fix #3338) --- src/app/tools/ink_processing.h | 5 +++++ src/app/tools/inks.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/tools/ink_processing.h b/src/app/tools/ink_processing.h index fbcba16d1..ce0771ee9 100644 --- a/src/app/tools/ink_processing.h +++ b/src/app/tools/ink_processing.h @@ -39,6 +39,11 @@ public: virtual void prepareUForPointShapeSlicedScanline(ToolLoop* loop, bool leftSlice, int x1) { } }; +class NoopInkProcessing : public BaseInkProcessing { +public: + void processScanline(int x1, int y, int x2, ToolLoop* loop) override { } +}; + typedef std::unique_ptr InkProcessingPtr; namespace { diff --git a/src/app/tools/inks.h b/src/app/tools/inks.h index 23307a352..56f6df7ec 100644 --- a/src/app/tools/inks.h +++ b/src/app/tools/inks.h @@ -61,7 +61,7 @@ protected: } private: - InkProcessingPtr m_proc; + InkProcessingPtr m_proc = std::make_unique(); }; // Ink used for tools which paint with primary/secondary