Win32: fix destruction order issue leading to crash on close.

This commit is contained in:
whitequark 2019-05-13 09:02:54 +00:00
parent f07e975db1
commit c44a471649

View File

@ -639,6 +639,10 @@ public:
} }
~WindowImplWin32() { ~WindowImplWin32() {
// Make sure any of our child windows get destroyed before we call DestroyWindow, or their
// own destructors may fail.
menuBar.reset();
sscheck(DestroyWindow(hWindow)); sscheck(DestroyWindow(hWindow));
#if defined(HAVE_SPACEWARE) #if defined(HAVE_SPACEWARE)
if(hSpaceWare != SI_NO_HANDLE) { if(hSpaceWare != SI_NO_HANDLE) {