mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-24 20:51:35 +00:00
[win] Avoid double destroy of window
I suspect it's from the recent event rework, but DestroyWindow seems to be getting called twice, despite the null protection. Not good.
This commit is contained in:
parent
43ce0eb3ec
commit
78113919ea
2 changed files with 4 additions and 7 deletions
|
@ -522,10 +522,6 @@ Win_CloseDisplay (void)
|
|||
PostMessage (HWND_BROADCAST, WM_SYSCOLORCHANGE, (WPARAM) 0, (LPARAM) 0);
|
||||
Win_Activate (false, false);
|
||||
|
||||
//FIXME? if (hwnd_dialog) DestroyWindow (hwnd_dialog);
|
||||
if (win_mainwindow)
|
||||
DestroyWindow (win_mainwindow);
|
||||
|
||||
vid_testingmode = 0;
|
||||
viddef.initialized = false;
|
||||
}
|
||||
|
@ -871,6 +867,7 @@ notify_destroy (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
if (win_mainwindow) {
|
||||
DestroyWindow (win_mainwindow);
|
||||
win_mainwindow = 0;
|
||||
}
|
||||
PostQuitMessage (0);
|
||||
return 1;
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
static vid_internal_t vid_internal;
|
||||
|
||||
static void
|
||||
VID_shutdown (void *data)
|
||||
Win_VID_shutdown (void *data)
|
||||
{
|
||||
Sys_MaskPrintf (SYS_vid, "VID_shutdown\n");
|
||||
Sys_MaskPrintf (SYS_vid, "Win_VID_shutdown\n");
|
||||
Win_CloseDisplay ();
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ Win_VID_SetPalette (byte *palette, byte *colormap)
|
|||
static void
|
||||
Win_VID_Init (byte *palette, byte *colormap)
|
||||
{
|
||||
Sys_RegisterShutdown (VID_shutdown, 0);
|
||||
Sys_RegisterShutdown (Win_VID_shutdown, 0);
|
||||
|
||||
vid_internal.gl_context = Win_GL_Context;
|
||||
vid_internal.sw_context = Win_SW_Context;
|
||||
|
|
Loading…
Reference in a new issue