aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-17 21:26:56 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-17 21:26:56 (GMT)
commit786eef6e39d58c590143d02f30e9949b40af1a24 (patch)
treede535eb18d387c29a26f5fd346c78e1429ab859c /src
parentf1f7bebf3722a24f0386424cb773e647bc6f5826 (diff)
downloadfluxbox-786eef6e39d58c590143d02f30e9949b40af1a24.zip
fluxbox-786eef6e39d58c590143d02f30e9949b40af1a24.tar.bz2
bugfix: forgot to resize 'pixels' before putting values into it (facepalm)
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/ImageControl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index 19d8793..13d6ec3 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -203,12 +203,12 @@ ImageControl::~ImageControl() {
203 Display *disp = FbTk::App::instance()->display(); 203 Display *disp = FbTk::App::instance()->display();
204 204
205 if (!m_colors.empty()) { 205 if (!m_colors.empty()) {
206 std::vector<unsigned long> pixels; 206 std::vector<unsigned long> pixels(m_colors.size());
207 207
208 for (unsigned int i = 0; i < m_colors.size(); i++) 208 for (unsigned int i = 0; i < m_colors.size(); i++)
209 pixels[i] = m_colors[i].pixel; 209 pixels[i] = m_colors[i].pixel;
210 210
211 XFreeColors(disp, m_colormap, &pixels[0], m_colors.size(), 0); 211 XFreeColors(disp, m_colormap, &pixels[0], pixels.size(), 0);
212 } 212 }
213 213
214 if (!cache.empty()) { 214 if (!cache.empty()) {