FIX: program exit crash of MediaFilePanel
Change-Id: I1f5dcdc461e2a551a2980bc76e585c34d68a541f
This commit is contained in:
parent
2565a66b6d
commit
0edb4476cf
|
@ -182,7 +182,8 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
|
|||
|
||||
auto onShowHide = [this](auto &e) {
|
||||
e.Skip();
|
||||
if (m_isBeingDeleted) return;
|
||||
if (auto w = dynamic_cast<wxWindow *>(e.GetEventObject()); !w || w->IsBeingDeleted())
|
||||
return;
|
||||
CallAfter([this] {
|
||||
auto fs = m_image_grid ? m_image_grid->GetFileSystem() : nullptr;
|
||||
if (fs) IsShownOnScreen() ? fs->Start() : fs->Stop();
|
||||
|
|
Loading…
Reference in New Issue