Commit 7391352a authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

wined3d: Fix a use after free (Coverity).

s is freed in set_window_state_thread().
parent 2146a442
...@@ -2199,8 +2199,6 @@ static void set_window_state(struct wined3d_window_state *s) ...@@ -2199,8 +2199,6 @@ static void set_window_state(struct wined3d_window_state *s)
* messages. */ * messages. */
if (window_tid == tid) if (window_tid == tid)
{ {
set_window_state_thread(s);
/* Deus Ex: Game of the Year Edition removes WS_EX_TOPMOST after changing resolutions in /* Deus Ex: Game of the Year Edition removes WS_EX_TOPMOST after changing resolutions in
* exclusive fullscreen mode. Tests show that WS_EX_TOPMOST will be restored when a ~1.5s * exclusive fullscreen mode. Tests show that WS_EX_TOPMOST will be restored when a ~1.5s
* timer times out */ * timer times out */
...@@ -2211,6 +2209,8 @@ static void set_window_state(struct wined3d_window_state *s) ...@@ -2211,6 +2209,8 @@ static void set_window_state(struct wined3d_window_state *s)
else else
KillTimer(s->window, WINED3D_WINDOW_TOPMOST_TIMER_ID); KillTimer(s->window, WINED3D_WINDOW_TOPMOST_TIMER_ID);
} }
set_window_state_thread(s);
} }
else if ((thread = CreateThread(NULL, 0, set_window_state_thread, s, 0, NULL))) else if ((thread = CreateThread(NULL, 0, set_window_state_thread, s, 0, NULL)))
{ {
......
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