mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
This commit is contained in:
parent
0da4e10c49
commit
51b266a2de
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,10 @@ public class ManaPieChart extends JComponent {
|
|||
for (int i = 0; i < slices.length; i++) {
|
||||
total += slices[i].value;
|
||||
}
|
||||
|
||||
if (total == 0.0D) {
|
||||
return; //there are no slices or no slices with a value > 0, stop here
|
||||
}
|
||||
|
||||
double curValue = 0.0D;
|
||||
int startAngle = 0;
|
||||
|
|
Loading…
Reference in a new issue