X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=blobmsg.h;h=e58f95deb6be700c501fdfb2b8b604df459db47b;hp=7041aca229e38c5285a4832c59d22efd9a9f6fdc;hb=682e071ef71f52125793aabb9e060343ea481443;hpb=f3977836afc82ce32c203173bd393789e05a123e diff --git a/blobmsg.h b/blobmsg.h index 7041aca..e58f95d 100644 --- a/blobmsg.h +++ b/blobmsg.h @@ -214,6 +214,9 @@ static inline uint64_t blobmsg_get_u64(struct blob_attr *attr) static inline char *blobmsg_get_string(struct blob_attr *attr) { + if (!attr) + return NULL; + return (char *) blobmsg_data(attr); }