aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/gui.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-25 18:38:24 +0200
committerEugene Sandulenko2016-04-25 18:38:24 +0200
commit35d5d93725a4a554b1f0ddc8009d9595c950476b (patch)
tree1046ac2b86b3397eb2ade0438328b78afc4cc623 /engines/wage/gui.cpp
parentb8fcb449c40f742a96aa45bcb01044611bfbf8fa (diff)
downloadscummvm-rg350-35d5d93725a4a554b1f0ddc8009d9595c950476b.tar.gz
scummvm-rg350-35d5d93725a4a554b1f0ddc8009d9595c950476b.tar.bz2
scummvm-rg350-35d5d93725a4a554b1f0ddc8009d9595c950476b.zip
WAGE: Fix crash when cursor is off-screen
Diffstat (limited to 'engines/wage/gui.cpp')
-rw-r--r--engines/wage/gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 2841013a26..5aacb96eaa 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -266,7 +266,7 @@ void Gui::draw() {
if (_menuDirty)
_menu->render();
- if (_cursorDirty) {
+ if (_cursorDirty && _cursorRect.left < _screen.w && _cursorRect.bottom < _screen.h) {
g_system->copyRectToScreen(_screen.getBasePtr(_cursorRect.left, _cursorRect.top), _screen.pitch,
_cursorRect.left, _cursorRect.top, _cursorRect.width(), _cursorRect.height());