Check the length of content string.
authorSung-jae Park <nicesj.park@samsung.com>
Wed, 11 Sep 2013 10:15:55 +0000 (19:15 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Wed, 11 Sep 2013 10:15:55 +0000 (19:15 +0900)
If it is zero length string, use the default content if exists.

Change-Id: Ib122bfb0ce82d9ebb25a94aa81580550f9923053

src/livebox.c

index 0b5ddcd..fe23d5c 100644 (file)
@@ -737,7 +737,7 @@ EAPI struct livebox *livebox_add_with_size(const char *pkgname, const char *cont
                return NULL;
        }
 
-       if (content) {
+       if (content && strlen(content)) {
                handler->content = strdup(content);
                if (!handler->content) {
                        ErrPrint("Error: %s\n", strerror(errno));