Commit 91769ca7 authored by Casper Boemann's avatar Casper Boemann

Make KoColor safet by initialising in all cases

svn path=/trunk/koffice/; revision=564163
parent b48ea222
......@@ -22,11 +22,13 @@
#include "KoColor.h"
#include "KoColorProfile.h"
#include "KoColorSpace.h"
#include "KoColorSpaceFactoryRegistry.h"
KoColor::KoColor()
{
m_data = 0;
m_colorSpace = 0;
m_colorSpace = KoColorSpaceFactoryRegistry::instance()->getColorSpace(KoID("LABA",0),"");
m_data = new quint8[m_colorSpace->pixelSize()];
memset(m_data, 0, m_colorSpace->pixelSize());
}
KoColor::~KoColor()
......
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