Commit 4a3af9ab authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check the whether the selected channel exists

If it's -1 or greater than the number of available channels, we
shouldn't try to get the channel from the list of channels.

BUG:395301
parent 0d9fadeb
......@@ -169,7 +169,7 @@ public:
// XXX: if the paint colorspace is rgb, we should do the channel swizzling in
// the display shader
if (!channelFlags.isEmpty()) {
if (!channelFlags.isEmpty() && selectedChannelIndex >= 0 && selectedChannelIndex < m_patchColorSpace->channels().size()) {
DataBuffer conversionCache(m_patchColorSpace->pixelSize(), m_pool);
QList<KoChannelInfo*> channelInfo = m_patchColorSpace->channels();
......
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