[Scummvm-git-logs] scummvm master -> 41871d090916425a47bec0c9c787a7be5ebeee4e
npjg
nathanael.gentrydb8 at gmail.com
Wed Jun 17 17:48:29 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
41871d0909 GRAPHICS: MACGUI: Fix logic errors in empty array handling
Commit: 41871d090916425a47bec0c9c787a7be5ebeee4e
https://github.com/scummvm/scummvm/commit/41871d090916425a47bec0c9c787a7be5ebeee4e
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-06-17T13:47:44-04:00
Commit Message:
GRAPHICS: MACGUI: Fix logic errors in empty array handling
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 917ec4a06e..9c65ec42a1 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -853,7 +853,8 @@ void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int
}
bool MacText::draw(bool forceRedraw) {
- if ((!_contentIsDirty && !_cursorDirty && !forceRedraw) || _textLines.empty())
+
+ if (!_contentIsDirty && !_cursorDirty && !forceRedraw)
return false;
if (!_surface) {
@@ -1217,6 +1218,9 @@ void MacText::scroll(int delta) {
}
void MacText::startMarking(int x, int y) {
+ if (_textLines.size() == 0)
+ return;
+
x -= getDimensions().left - 2;
y -= getDimensions().top;
More information about the Scummvm-git-logs
mailing list