Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blobmsg.h3
1 files changed, 3 insertions, 0 deletions
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);
}