Bump java lib versions to 13
[fw/altos] / micropeak / MicroDeviceDialog.java
index 7b8a630c83a8a24280b066855049e0fb13a0ba11..c39dab96c9535aa29cd07b94f6d5d097164ea139 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,12 +22,21 @@ import javax.swing.*;
 import java.awt.*;
 import java.awt.event.*;
 import java.util.*;
-import org.altusmetrum.altosuilib.*;
+import org.altusmetrum.altosuilib_13.*;
 
 public class MicroDeviceDialog extends AltosDeviceDialog {
 
        public AltosDevice[] devices() {
                java.util.List<MicroUSB>        list = MicroUSB.list();
+
+               if (list == null) {
+                       JOptionPane.showMessageDialog(frame,
+                                                     "libaltos failed to load",
+                                                     "Helper Library Failed",
+                                                     JOptionPane.ERROR_MESSAGE);
+                       return new AltosDevice[0];
+               }
+
                int             num_devices = list.size();
                AltosDevice[]   devices = new AltosDevice[num_devices];