Skip to content

Commit be01c39

Browse files
authored
Empty graph hack fixes #4722 and fixes #5316
1 parent ec2e9a6 commit be01c39

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/processing/app/SerialPlotter.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ private Ticks computeBounds() {
8787
minY = Double.POSITIVE_INFINITY;
8888
maxY = Double.NEGATIVE_INFINITY;
8989
for(Graph g : graphs) {
90-
minY = Math.min(g.buffer.min(), minY);
91-
maxY = Math.max(g.buffer.max(), maxY);
90+
if (!g.buffer.isEmpty()) {
91+
minY = Math.min(g.buffer.min(), minY);
92+
maxY = Math.max(g.buffer.max(), maxY);
93+
}
9294
}
9395

9496
final double MIN_DELTA = 10.0;

0 commit comments

Comments
 (0)