diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-04-04 22:03:03 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-04-04 22:03:24 +0200 |
commit | 90037b772c525ad734acb4641c9dacb7abf48ffe (patch) | |
tree | 201d36ac1fb0adebc66c4b38f7854fcdfc747fc2 /libubus-io.c | |
parent | 47b38c98ae1690c3a4430b7850f207a4b9294896 (diff) | |
download | ubus-90037b772c525ad734acb4641c9dacb7abf48ffe.tar.gz |
libubus: fix crash on reconnect with objects that have no type
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'libubus-io.c')
-rw-r--r-- | libubus-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libubus-io.c b/libubus-io.c index 0e7f25f..ca5fdaf 100644 --- a/libubus-io.c +++ b/libubus-io.c @@ -190,7 +190,8 @@ ubus_refresh_state(struct ubus_context *ctx) /* clear all type IDs, they need to be registered again */ avl_for_each_element(&ctx->objects, obj, avl) - obj->type->id = 0; + if (obj->type) + obj->type->id = 0; /* push out all objects again */ avl_for_each_element_safe(&ctx->objects, obj, avl, tmp) { |