Henri Verbeet : wined3d: Don' t unregister windows with the wrong window proc on unload either.

Alexandre Julliard julliard at winehq.org
Thu Apr 7 11:16:41 CDT 2011


Module: wine
Branch: master
Commit: 9d405473d091ee7e8f9319cbaf4d35146c982ca2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9d405473d091ee7e8f9319cbaf4d35146c982ca2

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Apr  6 19:17:51 2011 +0200

wined3d: Don't unregister windows with the wrong window proc on unload either.

This is the same issue as 7a354177b38c9451c938389576890a14d5c543fa, just on
wined3d unload this time.

---

 dlls/wined3d/wined3d_main.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 532314c..63cc677 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -355,8 +355,13 @@ static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL)
 
     for (i = 0; i < wndproc_table.count; ++i)
     {
-        struct wined3d_wndproc *entry = &wndproc_table.entries[i];
-        SetWindowLongPtrW(entry->window, GWLP_WNDPROC, (LONG_PTR)entry->proc);
+        /* Trying to unregister these would be futile. These entries can only
+         * exist if either we skipped them in wined3d_unregister_window() due
+         * to the application replacing the wndproc after the entry was
+         * registered, or if the application still has an active wined3d
+         * device. In the latter case the application has bigger problems than
+         * these entries. */
+        WARN("Leftover wndproc table entry %p.\n", &wndproc_table.entries[i]);
     }
     HeapFree(GetProcessHeap(), 0, wndproc_table.entries);
 




More information about the wine-cvs mailing list