Skip to content

Commit

Permalink
Don't crash drawing cluster table for vehicle with no cluster weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbraginskiy committed Jul 16, 2024
1 parent 6ddf8b1 commit 5696e42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion megameklab/src/megameklab/printing/PrintTank.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,13 @@ protected void drawFluffImage() {
hideElement(getSVGDocument().getElementById(NOTES));
}
} else {
var table = new ClusterHitsTable(this, true);
if (!table.required()) {
return;
}
Rectangle2D bbox = getRectBBox((SVGRectElement) rect);
placeReferenceCharts(
List.of(new ClusterHitsTable(this, true)),
List.of(table),
rect.getParentNode(), bbox.getX() - 3.0, bbox.getY() - 6.0,
bbox.getWidth() + 6.0, bbox.getHeight() + 12.0);
hideElement(getSVGDocument().getElementById(NOTES));
Expand Down

0 comments on commit 5696e42

Please sign in to comment.