aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2019-09-29 00:35:13 +0200
committerEugene Sandulenko2019-09-29 00:35:13 +0200
commit547122f73897ecad0dadc77000fca0bf4594f1a4 (patch)
tree9cdad7ec08e03e6d2ccb568a04a5d0e4215fcf6c /graphics
parente0c1cb063c7728c983c71a91beed3bafa8448c1b (diff)
downloadscummvm-rg350-547122f73897ecad0dadc77000fca0bf4594f1a4.tar.gz
scummvm-rg350-547122f73897ecad0dadc77000fca0bf4594f1a4.tar.bz2
scummvm-rg350-547122f73897ecad0dadc77000fca0bf4594f1a4.zip
MACGUI: Added sanity check to 9-patch recalculatuon
Diffstat (limited to 'graphics')
-rw-r--r--graphics/nine_patch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/nine_patch.cpp b/graphics/nine_patch.cpp
index d521df94d1..ddaf9abf68 100644
--- a/graphics/nine_patch.cpp
+++ b/graphics/nine_patch.cpp
@@ -128,7 +128,7 @@ void NinePatchSide::calcOffsets(int len) {
dest_offset += _m[i]->dest_length;
}
- if (remaining_stretch) {
+ if (remaining_stretch && _m.size()) {
_m[j]->dest_length += remaining_stretch;
if (j + 1 < _m.size())
_m[j + 1]->dest_offset += remaining_stretch;