- status_value.setText("Received MicroPeak Data");
- owner = owner.SetData(data);
- MicroSave save = new MicroSave(owner, data);
- if (save.runDialog())
- owner.SetName(data.name);
+ if (data.nsamples == 0) {
+ JOptionPane.showMessageDialog(owner,
+ "No Flight Data Present",
+ "Empty Log",
+ JOptionPane.WARNING_MESSAGE);
+ } else {
+ status_value.setText("Received MicroPeak Data");
+ owner = owner.SetData(data);
+ MicroSave save = new MicroSave(owner, data);
+ if (save.runDialog())
+ owner.SetName(data.name);
+ }