libubus: fix crash on reconnect with objects that have no type
Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
parent
47b38c98ae
commit
90037b772c
1 changed files with 2 additions and 1 deletions
|
@ -190,6 +190,7 @@ 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)
|
||||
if (obj->type)
|
||||
obj->type->id = 0;
|
||||
|
||||
/* push out all objects again */
|
||||
|
|
Loading…
Reference in a new issue