FIX: use thread stack to keep shared ref of PrinterFileSystem

Change-Id: I86dce263f43eb65074d4fec777cb08885505b7cf
(cherry picked from commit 1dbc32b2335c33831ac94a787c8e7ec7d898ccba)
This commit is contained in:
chunmao.guo 2022-09-27 13:11:01 +08:00 committed by Lane.Wei
parent e228e72db1
commit 35bb20b2cf
5 changed files with 19 additions and 11 deletions

View file

@ -220,6 +220,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
m_image_grid->SetStatus(m_bmp_failed.bmp(), _L("Not supported."));
} else {
boost::shared_ptr<PrinterFileSystem> fs(new PrinterFileSystem);
fs->Attached();
m_image_grid->SetFileType(m_last_type);
m_image_grid->SetFileSystem(fs);
fs->Bind(EVT_MODE_CHANGED, &MediaFilePanel::modeChanged, this);