wined3d: Release the stateblock only after mode setting in wined3d_device_reset().
commitd93e61f2499f747e7d70960f3a6547ed2b3a0b02
authorHenri Verbeet <hverbeet@codeweavers.com>
Tue, 26 Jun 2012 13:32:10 +0000 (26 15:32 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 26 Jun 2012 15:32:59 +0000 (26 17:32 +0200)
treec425c415f063da15b2288f8f53e1087251b9b887
parent0ee3007963f6b63c265c2e34da49deac65e3d5ef
wined3d: Release the stateblock only after mode setting in wined3d_device_reset().

While we're allowed to leave the device in a somewhat inconsistent state after
a failed reset, such a state should be recoverable by calling reset again. If
e.g. mode setting were to fail between the point where we destroy and recreate
the stateblock a subsequent reset would crash because the device doesn't have
a stateblock anymore.
dlls/wined3d/device.c