bugfix: forgot to resize 'pixels' before putting values into it (facepalm)

This commit is contained in:
Mathias Gumz 2010-09-17 23:26:56 +02:00
parent f1f7bebf37
commit 786eef6e39

View file

@ -203,12 +203,12 @@ ImageControl::~ImageControl() {
Display *disp = FbTk::App::instance()->display();
if (!m_colors.empty()) {
std::vector<unsigned long> pixels;
std::vector<unsigned long> pixels(m_colors.size());
for (unsigned int i = 0; i < m_colors.size(); i++)
pixels[i] = m_colors[i].pixel;
XFreeColors(disp, m_colormap, &pixels[0], m_colors.size(), 0);
XFreeColors(disp, m_colormap, &pixels[0], pixels.size(), 0);
}
if (!cache.empty()) {