http://bugs.winehq.org/show_bug.cgi?id=17005
--- Comment #6 from H. Verbeet hverbeet@gmail.com 2009-01-21 08:23:25 --- Created an attachment (id=18867) --> (http://bugs.winehq.org/attachment.cgi?id=18867) patch
Does this patch make any difference?
I think there's some code missing from the code you posted, but it looks like native ddraw doesn't set lpSurface to NULL when GetAttachedSurface() fails, while Wine's implementation does. Could you verify native ddraw leaves lpSurface unchanged in this case?