wined3d: Fix potential NULL dereference in IWineD3DSurfaceImpl_LockRect.
This commit is contained in:
parent
92bc96a96b
commit
13557abb7f
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue