aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
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;