proto_attach_interface(iface, proto_name);
- if (!(iface->proto_handler->flags & PROTO_FLAG_NODEV) &&
+ if (iface->proto_handler &&
+ !(iface->proto_handler->flags & PROTO_FLAG_NODEV) &&
(cur = tb[IFACE_ATTR_IFNAME])) {
dev = device_get(blobmsg_data(cur), true);
if (dev)