Commit fc1d259f authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Fix in Draw

parent 1f2b4178
......@@ -101,8 +101,12 @@ public final class Draw extends JFrame {
private void paintSubTrianglesRecursively(Triangle triangle) {
for (int i = 0; i < 3; i++) {
Triangle subTriangle = triangle.getSubTriangle(i);
paintTriangle(subTriangle);
if (subTriangle.isDivided()) paintSubTrianglesRecursively(subTriangle);
if (subTriangle != null) {
paintTriangle(subTriangle);
if (subTriangle.isDivided()) {
paintSubTrianglesRecursively(subTriangle);
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment