Huw Davies : d3d9/tests: Destroy the window after we release the device.

Alexandre Julliard julliard at winehq.org
Thu Dec 3 10:29:54 CST 2009


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Dec  3 13:28:15 2009 +0000

d3d9/tests: Destroy the window after we release the device.

Although either order is supposed to work, the former crashes with Wine.

---

 dlls/d3d9/tests/visual.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 18a69c6..15ddd44 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -10748,9 +10748,9 @@ cleanup:
 
         IDirect3DDevice9_GetSwapChain(device_ptr, 0, &swapchain);
         IDirect3DSwapChain9_GetPresentParameters(swapchain, &present_parameters);
-        DestroyWindow(present_parameters.hDeviceWindow);
         IDirect3DSwapChain9_Release(swapchain);
         ref = IDirect3DDevice9_Release(device_ptr);
         ok(ref == 0, "The device was not properly freed: refcount %u\n", ref);
+        DestroyWindow(present_parameters.hDeviceWindow);
     }
 }




More information about the wine-cvs mailing list