aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl/sdl-common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/sdl/sdl-common.cpp')
-rw-r--r--backends/sdl/sdl-common.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index 464f569f17..d4d31148fb 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -400,6 +400,9 @@ void OSystem_SDL_Common::set_mouse_pos(int x, int y) {
}
void OSystem_SDL_Common::set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) {
+
+ assert(0 < w && w <= MAX_MOUSE_W);
+ assert(0 < h && h <= MAX_MOUSE_H);
_mouseCurState.w = w;
_mouseCurState.h = h;