Add code for handling NULL exception 16/196216/1 accepted/tizen/unified/20181227.102126 submit/tizen/20181227.001142
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 26 Dec 2018 08:44:54 +0000 (17:44 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 26 Dec 2018 08:45:53 +0000 (17:45 +0900)
Change-Id: I5b3ae0a5305db81aeba848e5d7353ca44522f35c

src/log.c

index fa8ac31..28812ea 100755 (executable)
--- a/src/log.c
+++ b/src/log.c
@@ -314,6 +314,9 @@ static void print_backtrace(unsigned int offset)
                buf[len] = '\0';
 
                pos = strchr(buf, '\n');
+#if defined TIZEN_EXT
+               if (pos) {
+#endif
                *pos++ = '\0';
 
                if (strcmp(buf, "??") == 0) {
@@ -330,6 +333,9 @@ static void print_backtrace(unsigned int offset)
 
                connman_error("#%-2u %p in %s() at %s", i - offset,
                                                frames[i], buf, pos);
+#if defined TIZEN_EXT
+               }
+#endif
        }
 
        connman_error("+++++++++++++++++++++++++++");