Commit 13557abb authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

wined3d: Fix potential NULL dereference in IWineD3DSurfaceImpl_LockRect.

parent 92bc96a9
......@@ -673,7 +673,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
/* NOTE: In a shared context environment the renderTarget will use the same context as the implicit swapchain (we're not in a shared environment yet! */
if ((swapchain == targetSwapChain && targetSwapChain != NULL) || iface == myDevice->renderTarget) {
if (iface == swapchain->frontBuffer) {
if (swapchain && iface == swapchain->frontBuffer) {
TRACE("locking front\n");
glReadBuffer(GL_FRONT);
}
......
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