From b6fbb3e84af76155997c9c3d944fbc92c5e43dd4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Thu, 13 Apr 2023 20:33:20 +0300 Subject: [PATCH] Fix RTG with HW cursor crash when exiting --- od-win32/direct3d11.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/od-win32/direct3d11.cpp b/od-win32/direct3d11.cpp index 2a0404eb..476a6436 100644 --- a/od-win32/direct3d11.cpp +++ b/od-win32/direct3d11.cpp @@ -5254,6 +5254,10 @@ static void updatecursorsurface(int monid) int width = sp->width; int height = sp->height; + if (sp->texture == NULL) { + return; + } + if (sp->updated && cx >= 0 && cy >= 0 && cx + width <= d3d->m_bitmapWidth && cy + height <= d3d->m_bitmapHeight) { return; } -- 2.47.3