diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp index 7fb0ce635e..4a90575149 100644 --- a/src/slic3r/GUI/BitmapCache.cpp +++ b/src/slic3r/GUI/BitmapCache.cpp @@ -34,8 +34,11 @@ void BitmapCache::clear() { for (std::pair &bitmap : m_map) delete bitmap.second; - m_map.clear(); + + for (std::pair &bitmap_bundle : m_bndl_map) + delete bitmap_bundle.second; + m_bndl_map.clear(); } static wxBitmap wxImage_to_wxBitmap_with_alpha(wxImage &&image, float scale = 1.0f)