From f615b3392bf4ffcae33c9d5c18904a867512b2f3 Mon Sep 17 00:00:00 2001 From: Nitrus Date: Tue, 20 Nov 2018 18:59:56 +0100 Subject: 3DS: Fix assertion issue in case cursor dimensions are zero --- backends/platform/3ds/osystem-graphics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backends/platform/3ds/osystem-graphics.cpp') diff --git a/backends/platform/3ds/osystem-graphics.cpp b/backends/platform/3ds/osystem-graphics.cpp index ebc1b8c7ed..15fabc7a01 100644 --- a/backends/platform/3ds/osystem-graphics.cpp +++ b/backends/platform/3ds/osystem-graphics.cpp @@ -479,7 +479,10 @@ void OSystem_3DS::setMouseCursor(const void *buf, uint w, uint h, _cursorTexture.create(w, h, _pfGameTexture); } - _cursor.copyRectToSurface(buf, w, 0, 0, w, h); + if ( w != 0 && h != 0 ) { + _cursor.copyRectToSurface(buf, w, 0, 0, w, h); + } + flushCursor(); warpMouse(_cursorX, _cursorY); -- cgit v1.2.3