projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stmf0: Split up rom load in altos.ld to make linker happy
[fw/altos]
/
micropeak
/
MicroDeviceDialog.java
diff --git
a/micropeak/MicroDeviceDialog.java
b/micropeak/MicroDeviceDialog.java
index 7b8a630c83a8a24280b066855049e0fb13a0ba11..010612a0f37c34b21339128919d3b5948040ad25 100644
(file)
--- a/
micropeak/MicroDeviceDialog.java
+++ b/
micropeak/MicroDeviceDialog.java
@@
-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
*
* 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
*
* 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 java.awt.*;
import java.awt.event.*;
import java.util.*;
-import org.altusmetrum.altosuilib.*;
+import org.altusmetrum.altosuilib
_11
.*;
public class MicroDeviceDialog extends AltosDeviceDialog {
public AltosDevice[] devices() {
java.util.List<MicroUSB> list = MicroUSB.list();
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];
int num_devices = list.size();
AltosDevice[] devices = new AltosDevice[num_devices];