diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/ImageControl.cc | 4 |
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()) { |