From 91e762b7bc2ee0a1960122dc9be600f2b4f5895e Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 20 Aug 2009 12:52:17 +0000 Subject: [PATCH] bugfix: do not assume that the debugged mote is compiled from source --- .../se/sics/cooja/mspmote/plugins/MspCodeWatcher.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java index b9003342f..74bae373c 100644 --- a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java +++ b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: MspCodeWatcher.java,v 1.18 2009/06/15 09:44:42 fros4943 Exp $ + * $Id: MspCodeWatcher.java,v 1.19 2009/08/20 12:52:17 fros4943 Exp $ */ package se.sics.cooja.mspmote.plugins; @@ -304,9 +304,11 @@ public class MspCodeWatcher extends VisPlugin { private static File[] getSourceFiles(MspMote mote) { String[] sourceFiles = mote.getELF().getDebug().getSourceFiles(); File contikiSource = mote.getType().getContikiSourceFile(); - try { - contikiSource = contikiSource.getCanonicalFile(); - } catch (IOException e1) { + if (contikiSource != null) { + try { + contikiSource = contikiSource.getCanonicalFile(); + } catch (IOException e1) { + } } /* Verify that files exist */