Commit f5dd77bf authored by Mathias Wein's avatar Mathias Wein

Fix KoColor::setColor()

It did not update m_size to match the given color profile,
which causes a corrupt internal state.
parent a76f4c34
......@@ -172,10 +172,10 @@ void KoColor::setColor(const quint8 * data, const KoColorSpace * colorSpace)
{
Q_ASSERT(colorSpace);
const size_t size = colorSpace->pixelSize();
Q_ASSERT(size <= MAX_PIXEL_SIZE);
m_size = colorSpace->pixelSize();
Q_ASSERT(m_size <= MAX_PIXEL_SIZE);
memcpy(m_data, data, size);
memcpy(m_data, data, m_size);
m_colorSpace = KoColorSpaceRegistry::instance()->permanentColorspace(colorSpace);
}
......
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