mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Fixed possible use of invalid HWND.
This commit is contained in:
parent
4923f1cf7e
commit
04ea2112bd
@ -930,24 +930,24 @@ static int createWindow(_GLFWwindow* window,
|
||||
|
||||
free(wideTitle);
|
||||
|
||||
if (_glfw_ChangeWindowMessageFilterEx)
|
||||
{
|
||||
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
|
||||
WM_DROPFILES, MSGFLT_ALLOW, NULL);
|
||||
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
|
||||
WM_COPYDATA, MSGFLT_ALLOW, NULL);
|
||||
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
|
||||
WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL);
|
||||
}
|
||||
|
||||
DragAcceptFiles(window->win32.handle, TRUE);
|
||||
|
||||
if (!window->win32.handle)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (_glfw_ChangeWindowMessageFilterEx)
|
||||
{
|
||||
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
|
||||
WM_DROPFILES, MSGFLT_ALLOW, NULL);
|
||||
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
|
||||
WM_COPYDATA, MSGFLT_ALLOW, NULL);
|
||||
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
|
||||
WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL);
|
||||
}
|
||||
|
||||
DragAcceptFiles(window->win32.handle, TRUE);
|
||||
|
||||
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
||||
return GL_FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user