From 30be98a575447717208300d0f8bcfce51e5fd651 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Mon, 11 Dec 2006 12:20:06 +0000 Subject: [PATCH] bug fix: radio logger generated null pointer exception --- .../sics/cooja/radiomediums/StandardRadioMedium.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/radiomediums/StandardRadioMedium.java b/tools/cooja/java/se/sics/cooja/radiomediums/StandardRadioMedium.java index 099c4cb5f..34bb29517 100644 --- a/tools/cooja/java/se/sics/cooja/radiomediums/StandardRadioMedium.java +++ b/tools/cooja/java/se/sics/cooja/radiomediums/StandardRadioMedium.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: StandardRadioMedium.java,v 1.9 2006/12/07 14:28:54 fros4943 Exp $ + * $Id: StandardRadioMedium.java,v 1.10 2006/12/11 12:20:06 fros4943 Exp $ */ package se.sics.cooja.radiomediums; @@ -475,15 +475,15 @@ public class StandardRadioMedium extends RadioMedium { pendingConnections = updatedPendingConnections; + if (myLogger != null) { + for (RadioConnection conn : lastTickConnections) + myLogger.logConnection(conn); + } + // Radio medium has changed, notifing below radioMediumObservable.setRadioMediumChanged(); } - if (myLogger != null) { - for (RadioConnection conn : lastTickConnections) - myLogger.logConnection(conn); - } - // Set signal strengths on all radios for (Radio radio : registeredRadios) { if (radio.isTransmitting())