From ca43328583a3859f8f7f117f379ef06d7f5c0663 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 30 Jun 2018 16:50:15 +0300 Subject: [PATCH] Added safety check. --- od-win32/direct3d.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index b77aba52..8b95d7cb 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -4054,6 +4054,8 @@ static uae_u8 *xD3D_setcursorsurface(int monid, int *pitch) struct d3dstruct *d3d = &d3ddata[monid]; if (pitch) { D3DLOCKED_RECT locked; + if (!d3d->cursorsurfaced3d) + return NULL; HRESULT hr = d3d->cursorsurfaced3d->LockRect(0, &locked, NULL, 0); if (FAILED(hr)) return NULL; -- 2.47.3