wined3d: Register a window only once.

This commit is contained in:
Henri Verbeet 2010-11-10 10:53:03 +01:00 committed by Alexandre Julliard
parent 2b0684c56d
commit 9a1fddb0fd
1 changed files with 7 additions and 0 deletions

View File

@ -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);