X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=ubusd_event.c;h=6d4ddcf9fdff14a6c90f59665354cb3c0bcdfd6e;hp=85031a6fc150c94847b1db9b3381f8ff485ea72b;hb=7798d56301b7264cbcea0a6a9225a210154c693a;hpb=2d660c519d2fcff95248da9f4fd9b37d61f9eb09 diff --git a/ubusd_event.c b/ubusd_event.c index 85031a6..6d4ddcf 100644 --- a/ubusd_event.c +++ b/ubusd_event.c @@ -267,6 +267,7 @@ void ubusd_event_init(void) { ubus_init_string_tree(&patterns, true); event_obj = ubusd_create_object_internal(NULL, UBUS_SYSTEM_OBJECT_EVENT); - event_obj->recv_msg = ubusd_event_recv; + if (event_obj != NULL) + event_obj->recv_msg = ubusd_event_recv; }