FIX: crash on MacOS when system logout, not really Close mainframe

Change-Id: I0e7cc73c1b4bbc663105034e82dcd7a51998e244
This commit is contained in:
chunmao.guo 2022-08-30 10:57:12 +08:00 committed by Lane.Wei
parent 8319ef604c
commit de712b08f1
3 changed files with 14 additions and 5 deletions

View file

@ -104,7 +104,7 @@ struct DpiChangedEvent : public wxEvent {
wxDECLARE_EVENT(EVT_DPI_CHANGED_SLICER, DpiChangedEvent);
#endif // !wxVERSION_EQUAL_OR_GREATER_THAN
extern std::vector<wxDialog*> dialogStack;
extern std::deque<wxDialog*> dialogStack;
template<class P> class DPIAware : public P
{
@ -226,9 +226,9 @@ public:
int ShowModal()
{
dialogStack.push_back(this);
dialogStack.push_front(this);
int r = wxDialog::ShowModal();
dialogStack.pop_back();
dialogStack.pop_front();
return r;
}