bugfix: forgot to resize 'pixels' before putting values into it (facepalm)
This commit is contained in:
parent
f1f7bebf37
commit
786eef6e39
1 changed files with 2 additions and 2 deletions
|
@ -203,12 +203,12 @@ ImageControl::~ImageControl() {
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Display *disp = FbTk::App::instance()->display();
|
||||||
|
|
||||||
if (!m_colors.empty()) {
|
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++)
|
for (unsigned int i = 0; i < m_colors.size(); i++)
|
||||||
pixels[i] = m_colors[i].pixel;
|
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()) {
|
if (!cache.empty()) {
|
||||||
|
|
Loading…
Reference in a new issue