From 547122f73897ecad0dadc77000fca0bf4594f1a4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 29 Sep 2019 00:35:13 +0200 Subject: MACGUI: Added sanity check to 9-patch recalculatuon --- graphics/nine_patch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/nine_patch.cpp') 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; -- cgit v1.2.3