FIX: crash of PrinterFileSystem on program exiting
Change-Id: I68afa6768d4e594e7402c5aa8a3c78e363d17173
This commit is contained in:
parent
bfca09c7b2
commit
61d2d47854
|
@ -154,6 +154,11 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
|
|||
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
||||
}
|
||||
|
||||
MediaFilePanel::~MediaFilePanel()
|
||||
{
|
||||
SetMachineObject(nullptr);
|
||||
}
|
||||
|
||||
void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
||||
{
|
||||
std::string machine = obj ? obj->dev_id : "";
|
||||
|
@ -269,4 +274,4 @@ MediaFileFrame::MediaFileFrame(wxWindow* parent)
|
|||
|
||||
void MediaFileFrame::on_dpi_changed(const wxRect& suggested_rect) { m_panel->Rescale(); Refresh(); }
|
||||
|
||||
}}
|
||||
}}
|
||||
|
|
|
@ -31,6 +31,8 @@ class MediaFilePanel : public wxPanel
|
|||
{
|
||||
public:
|
||||
MediaFilePanel(wxWindow * parent);
|
||||
|
||||
~MediaFilePanel();
|
||||
|
||||
void SetMachineObject(MachineObject * obj);
|
||||
|
||||
|
|
Loading…
Reference in New Issue