Commit 50c10113 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Refuse to ReleaseDC the wrong DC.

parent ea283d3c
......@@ -1456,6 +1456,11 @@ HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) {
if (!(This->Flags & SFLAG_DCINUSE))
return WINED3DERR_INVALIDCALL;
if (This->hDC !=hDC) {
WARN("Application tries to release an invalid DC(%p), surface dc is %p\n", hDC, This->hDC);
return WINED3DERR_INVALIDCALL;
}
/* we locked first, so unlock now */
IWineD3DSurface_UnlockRect(iface);
......
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