mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fixed a crash on exit by calling DefWindowProc after the WM_DESTORY message has been received. Patch by eddie.willett.
Fixes issue 4588. Fixes issue 5285.
This commit is contained in:
parent
418f46ea72
commit
281d7531a3
2
Externals/wxWidgets/include/wx/msw/window.h
vendored
2
Externals/wxWidgets/include/wx/msw/window.h
vendored
@ -365,7 +365,7 @@ public:
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
// Calls an appropriate default window procedure
|
||||
virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam, bool callDefWindowProc = false);
|
||||
|
||||
// message processing helpers
|
||||
|
||||
|
13
Externals/wxWidgets/src/msw/window.cpp
vendored
13
Externals/wxWidgets/src/msw/window.cpp
vendored
@ -2234,9 +2234,9 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
// pre/post message processing
|
||||
// ===========================================================================
|
||||
|
||||
WXLRESULT wxWindowMSW::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
WXLRESULT wxWindowMSW::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam, bool callDefWindowProc /* = false */)
|
||||
{
|
||||
if ( m_oldWndProc )
|
||||
if (!callDefWindowProc && m_oldWndProc)
|
||||
return ::CallWindowProc(CASTWNDPROC m_oldWndProc, GetHwnd(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
|
||||
else
|
||||
return ::DefWindowProc(GetHwnd(), nMsg, wParam, lParam);
|
||||
@ -2653,11 +2653,12 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
// never set processed to true and *always* pass WM_DESTROY to
|
||||
// DefWindowProc() as Windows may do some internal cleanup when
|
||||
// processing it and failing to pass the message along may cause
|
||||
// memory and resource leaks!
|
||||
// *always* pass WM_DESTROY to DefWindowProc() as Windows may do
|
||||
// some internal cleanup when processing it and failing to pass
|
||||
// the message along may cause memory and resource leaks!
|
||||
(void)HandleDestroy();
|
||||
rc.result = MSWDefWindowProc(message, wParam, lParam, true);
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
|
Loading…
Reference in New Issue
Block a user