[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [krita/rempt/impex-refactoring] libs/image/lazybrush: Fix a crash in cloning the colorize mask
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2016-11-09 11:00:03
Message-ID: E1c4Qbr-0005yj-7U () code ! kde ! org
[Download RAW message or body]

Git commit dfaca5d69836a87f252c766b290b02add78f4fe4 by Dmitry Kazakov.
Committed on 09/11/2016 at 10:59.
Pushed by dkazakov into branch 'rempt/impex-refactoring'.

Fix a crash in cloning the colorize mask

M  +5    -6    libs/image/lazybrush/kis_colorize_mask.cpp

http://commits.kde.org/krita/dfaca5d69836a87f252c766b290b02add78f4fe4

diff --git a/libs/image/lazybrush/kis_colorize_mask.cpp b/libs/image/lazybrush/kis_colorize_mask.cpp
index 82a5d1e..d9308c4 100644
--- a/libs/image/lazybrush/kis_colorize_mask.cpp
+++ b/libs/image/lazybrush/kis_colorize_mask.cpp
@@ -52,7 +52,10 @@ using namespace KisLazyFillTools;
 struct KisColorizeMask::Private
 {
     Private()
-        : needAddCurrentKeyStroke(false),
+        : coloringProjection(new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8())),
+          fakePaintDevice(new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8())),
+          filteredSource(new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8())),
+          needAddCurrentKeyStroke(false),
           showKeyStrokes(true),
           showColoring(true),
           needsUpdate(true),
@@ -64,6 +67,7 @@ struct KisColorizeMask::Private
     Private(const Private &rhs)
         : coloringProjection(new KisPaintDevice(*rhs.coloringProjection)),
           fakePaintDevice(new KisPaintDevice(*rhs.fakePaintDevice)),
+          filteredSource(new KisPaintDevice(*rhs.filteredSource)),
           needAddCurrentKeyStroke(rhs.needAddCurrentKeyStroke),
           showKeyStrokes(rhs.showKeyStrokes),
           showColoring(rhs.showColoring),
@@ -102,11 +106,6 @@ struct KisColorizeMask::Private
 KisColorizeMask::KisColorizeMask()
     : m_d(new Private)
 {
-    const KoColorSpace *colorSpace = KoColorSpaceRegistry::instance()->rgb8();
-    m_d->fakePaintDevice = new KisPaintDevice(colorSpace);
-    m_d->filteredSource = new KisPaintDevice(colorSpace);
-    m_d->coloringProjection = new KisPaintDevice(colorSpace);
-
     connect(&m_d->updateCompressor,
             SIGNAL(timeout()),
             SLOT(slotUpdateRegenerateFilling()));
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic