http://bugs.winehq.org/show_bug.cgi?id=27610
--- Comment #1 from Piotr Pawlow pp@siedziba.pl 2011-06-26 22:01:29 CDT --- Created an attachment (id=35297) --> (http://bugs.winehq.org/attachment.cgi?id=35297) Avoid destroying other swapchains' contexts
The function delete_opengl_contexts() in wined3d/device.c is destroying contexts belonging to other swapchains than the one passed as the 2nd argument. Here we have 2 swapchains, and the reference forwarding patch seems to cause the second swapchain to be kept longer than before, across device reset. Its context gets destroyed, and then when its reference count finally goes to zero, it tries to destroy already destroyed context, which causes the crash.