[PATCH 1/1] wined3d: Also destroy the logo and cursor textures in wined3d_device_reset() when resetting state.

Henri Verbeet hverbeet at codeweavers.com
Thu Jan 30 10:32:04 CST 2014


---
 dlls/wined3d/device.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 6ef944c..256052f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4137,7 +4137,19 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
     }
 
     if (reset_state)
+    {
+        if (device->logo_texture)
+        {
+            wined3d_texture_decref(device->logo_texture);
+            device->logo_texture = NULL;
+        }
+        if (device->cursor_texture)
+        {
+            wined3d_texture_decref(device->cursor_texture);
+            device->cursor_texture = NULL;
+        }
         state_unbind_resources(&device->state);
+    }
 
     if (device->fb.render_targets)
     {
-- 
1.7.10.4




More information about the wine-patches mailing list