From 5c5775e93b663a89ceb41e3c2847d2708008abb0 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Sun, 16 Dec 2007 14:31:43 +0000 Subject: [PATCH] Ensure that receiver_callback is set before calling it --- core/net/mac/nullmac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/net/mac/nullmac.c b/core/net/mac/nullmac.c index c9f2b26f1..9d3a98d91 100644 --- a/core/net/mac/nullmac.c +++ b/core/net/mac/nullmac.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: nullmac.c,v 1.4 2007/10/23 21:27:57 adamdunkels Exp $ + * $Id: nullmac.c,v 1.5 2007/12/16 14:31:43 adamdunkels Exp $ */ /** @@ -53,7 +53,9 @@ send(void) static void input(const struct radio_driver *d) { - receiver_callback(&nullmac_driver); + if(receiver_callback) { + receiver_callback(&nullmac_driver); + } } /*---------------------------------------------------------------------------*/ static int