Commit 9a1fddb0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Register a window only once.

parent 2b0684c5
...@@ -422,6 +422,13 @@ BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device) ...@@ -422,6 +422,13 @@ BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device)
wined3d_mutex_lock(); 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) if (wndproc_table.size == wndproc_table.count)
{ {
unsigned int new_size = max(1, wndproc_table.size * 2); unsigned int new_size = max(1, wndproc_table.size * 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment