mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-18 12:08:16 +00:00
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! */
|
/* 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 ((swapchain == targetSwapChain && targetSwapChain != NULL) || iface == myDevice->renderTarget) {
|
||||||
if (iface == swapchain->frontBuffer) {
|
if (swapchain && iface == swapchain->frontBuffer) {
|
||||||
TRACE("locking front\n");
|
TRACE("locking front\n");
|
||||||
glReadBuffer(GL_FRONT);
|
glReadBuffer(GL_FRONT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue