From 9a1fddb0fd8f0d5c2c8601a9eadfe7737598c007 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 10 Nov 2010 10:53:03 +0100 Subject: [PATCH] wined3d: Register a window only once. --- dlls/wined3d/wined3d_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index 0932351e2ad..0e4470274d9 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -422,6 +422,13 @@ BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device) wined3d_mutex_lock(); + if (wined3d_find_wndproc(window)) + { + wined3d_mutex_unlock(); + WARN("Window %p is already registered with wined3d.\n", window); + return TRUE; + } + if (wndproc_table.size == wndproc_table.count) { unsigned int new_size = max(1, wndproc_table.size * 2);