*
* 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
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];