wined3d: Avoid accessing the device after deactivation some more.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4cabe3612f
commit
a4104c7c60
|
@ -5315,9 +5315,13 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
|||
}
|
||||
else if (message == WM_ACTIVATEAPP)
|
||||
{
|
||||
UINT i;
|
||||
unsigned int i = device->swapchain_count;
|
||||
|
||||
for (i = 0; i < device->swapchain_count; i++)
|
||||
/* Deactivating the implicit swapchain may cause the application
|
||||
* (e.g. Deus Ex: GOTY) to destroy the device, so take care to
|
||||
* deactivate the implicit swapchain last, and to avoid accessing the
|
||||
* "device" pointer afterwards. */
|
||||
while (i--)
|
||||
wined3d_swapchain_activate(device->swapchains[i], wparam);
|
||||
}
|
||||
else if (message == WM_SYSCOMMAND)
|
||||
|
|
Loading…
Reference in New Issue