Skip to content

Commit

Permalink
fix creating corrupt bbox if a component is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Péter Báthory committed Jun 27, 2020
1 parent 848f4f4 commit 694e2f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Geometry/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ public function getBBox()
$maxX = $maxY = $minX = $minY = 0;
foreach ($this->components as $i => $component) {
$componentBoundingBox = $component->getBBox();
if ($componentBoundingBox === null) {
continue;
}

// On the first run through, set the bounding box to the component's bounding box
if ($i == 0) {
Expand Down

0 comments on commit 694e2f3

Please sign in to comment.