Fix crash when destroying wxPopupWindow without hiding it first

The global wxCurrentPopupWindow used by wxMSW wasn't reset in this case
and resulted in a crash during the next mouse or focus event.

Do it in wxPopupWindow dtor now, and not just when the popup is hidden.
This commit is contained in:
Vadim Zeitlin
2020-08-14 13:15:49 +02:00
parent e96155fece
commit c80e529021
2 changed files with 10 additions and 0 deletions

View File

@@ -25,6 +25,8 @@ public:
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
virtual ~wxPopupWindow();
virtual void SetFocus() wxOVERRIDE;
virtual bool Show(bool show = true) wxOVERRIDE;