From 03b3ac914347a7c998fd94e7b64c2f414a7a5e45 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 6 Dec 2006 15:20:18 +0000 Subject: [PATCH] checking that background image was actually loaded --- tools/cooja/apps/arm/java/se/sics/arm/AreaViewer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/cooja/apps/arm/java/se/sics/arm/AreaViewer.java b/tools/cooja/apps/arm/java/se/sics/arm/AreaViewer.java index 7e9fac487..aab1fd870 100644 --- a/tools/cooja/apps/arm/java/se/sics/arm/AreaViewer.java +++ b/tools/cooja/apps/arm/java/se/sics/arm/AreaViewer.java @@ -870,6 +870,15 @@ public class AreaViewer extends VisPlugin { try { tracker.waitForAll(); + if (tracker.isErrorAny()) { + logger.fatal("Error when loading image: "); + for (Object errorObject: tracker.getErrorsAny()) + logger.fatal("> " + errorObject); + } + if (image == null) { + logger.fatal("Image is null, aborting"); + return; + } } catch (InterruptedException ex) { logger.fatal("Interrupted during image loading, aborting"); return;