mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 08:55:58 +08:00
Fixed memory leak in Tab::add_options_page()
This commit is contained in:
parent
6d5d4e7c24
commit
4c527776e7
@ -234,9 +234,9 @@ Slic3r::GUI::PageShp Tab::add_options_page(const wxString& title, const std::str
|
|||||||
icon_idx = (m_icon_index.find(icon) == m_icon_index.end()) ? -1 : m_icon_index.at(icon);
|
icon_idx = (m_icon_index.find(icon) == m_icon_index.end()) ? -1 : m_icon_index.at(icon);
|
||||||
if (icon_idx == -1) {
|
if (icon_idx == -1) {
|
||||||
// Add a new icon to the icon list.
|
// Add a new icon to the icon list.
|
||||||
const auto img_icon = new wxIcon(from_u8(Slic3r::var(icon)), wxBITMAP_TYPE_PNG);
|
wxIcon img_icon(from_u8(Slic3r::var(icon)), wxBITMAP_TYPE_PNG);
|
||||||
m_icons->Add(*img_icon);
|
m_icons->Add(img_icon);
|
||||||
icon_idx = ++m_icon_count;
|
icon_idx = ++m_icon_count;
|
||||||
m_icon_index[icon] = icon_idx;
|
m_icon_index[icon] = icon_idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user