X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=plugins%2Fsamples%2FHelloWorld.c;h=e29c22fa878fca01c5c5ad9e71e1f9944aa45731;hb=94a5b505f7ef7760fcfa7b824ee49758eb63a9e8;hp=fd780e20981fafb38e2d1f60c44e141e7ff13a25;hpb=fc19b7d7974f9c64dffc40e180464d595a9805cd;p=src%2Fapp-framework-binder.git diff --git a/plugins/samples/HelloWorld.c b/plugins/samples/HelloWorld.c index fd780e20..e29c22fa 100644 --- a/plugins/samples/HelloWorld.c +++ b/plugins/samples/HelloWorld.c @@ -29,7 +29,8 @@ static int fillargs(json_object *args, struct afb_arg arg) obj = json_object_new_object(); json_object_object_add (obj, "value", json_object_new_string(arg.value)); - json_object_object_add (obj, "path", json_object_new_string(arg.path)); + if (arg.path != NULL) + json_object_object_add (obj, "path", json_object_new_string(arg.path)); json_object_object_add (obj, "size", json_object_new_int64((int64_t)arg.size)); json_object_object_add (args, arg.name && *arg.name ? arg.name : "", obj); return 1; /* continue to iterate */