[Scummvm-git-logs] scummvm master -> 2bcc7f2bc47d94f07e5722af8a05b0da531717d8

sev- sev at scummvm.org
Wed Jun 10 23:04:26 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:
2bcc7f2bc4 GRAPHICS: MACGUI: Optimize MacText::getTextChunk()


Commit: 2bcc7f2bc47d94f07e5722af8a05b0da531717d8
    https://github.com/scummvm/scummvm/commit/2bcc7f2bc47d94f07e5722af8a05b0da531717d8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-06-11T01:04:08+02:00

Commit Message:
GRAPHICS: MACGUI: Optimize MacText::getTextChunk()

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 54908256e9..f6d8b84042 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -784,6 +784,10 @@ Common::U32String MacText::getTextChunk(int startRow, int startCol, int endRow,
 	if (endCol == -1)
 		endCol = getLineCharWidth(endRow);
 
+	if (_textLines.empty()) {
+		return res;
+	}
+
 	startRow = CLIP(startRow, 0, (int)_textLines.size() - 1);
 	endRow = CLIP(endRow, 0, (int)_textLines.size() - 1);
 




More information about the Scummvm-git-logs mailing list