diff options
author | David Tardon <dtardon@redhat.com> | 2018-03-21 15:03:03 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2018-03-21 15:03:03 +0100 |
commit | 3988aba06f5297fc2262462d89cb601aeffcae3b (patch) | |
tree | 77e004f560182d08c47eab52447d5007240cb48f | |
parent | 4a517815d868b3fa5ab4bf99621177dda8dc3f3b (diff) |
ofz#7053 avoid access to empty vector
Change-Id: I0d353901c1d5a02b57cc068aa9b7669af81f3073
-rw-r--r-- | src/lib/PolygonUtils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/PolygonUtils.cpp b/src/lib/PolygonUtils.cpp index 7738809..17f3515 100644 --- a/src/lib/PolygonUtils.cpp +++ b/src/lib/PolygonUtils.cpp @@ -5786,6 +5786,10 @@ void drawEmulatedLine(std::shared_ptr<const CustomShape> shape, ShapeType shapeT } } } + + if (lineInfos.empty()) + return; + if (rectangle) { LineInfo *top = &lineInfos[0]; |