Commit 4d3fbd9b authored by Blackbeard (alberto flores)'s avatar Blackbeard (alberto flores) 🚢

Fix the segmentation fault

parent 065ac9ba
...@@ -148,15 +148,8 @@ void KisVectorAnimatedBrush::newbrushTip() ...@@ -148,15 +148,8 @@ void KisVectorAnimatedBrush::newbrushTip()
setBrushTipImage(image); setBrushTipImage(image);
setValid(true); setValid(true);
// Well for now, always true setBrushType(MASK);
if (brushTipImage().isGrayscale()) { setHasColor(false);
setBrushType(MASK);
setHasColor(false);
}
else {
setBrushType(IMAGE);
setHasColor(true);
}
setWidth(brushTipImage().width()); setWidth(brushTipImage().width());
setHeight(brushTipImage().height()); setHeight(brushTipImage().height());
......
...@@ -35,6 +35,8 @@ void KisVectorBrushParasite::parseSvg(QByteArray svg) ...@@ -35,6 +35,8 @@ void KisVectorBrushParasite::parseSvg(QByteArray svg)
{ {
m_shapes= svgToKoShapes(svg); m_shapes= svgToKoShapes(svg);
m_maxIndex = m_shapes.size(); m_maxIndex = m_shapes.size();
//minus one because count starts from zero
m_maxIndex--;
} }
......
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