Prevent valgrind error with Json parser 73/24173/1
authorLee Morgan <Lee.morgan@partner.samsung.com>
Thu, 19 Jun 2014 14:19:30 +0000 (15:19 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 17:47:12 +0000 (18:47 +0100)
Change-Id: Iad91a8d2cf5ec0c7d1cfa41786a1e95a8c56d065
Signed-off-by: Lee Morgan <Lee.morgan@partner.samsung.com>
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
base/dali-toolkit/internal/builder/json-parser-state.cpp

index d7d51a4..1547156 100644 (file)
@@ -350,6 +350,11 @@ bool JsonParserState::ParseWhiteSpace()
   bool c_comment   = false;
   bool cpp_comment = false;
 
   bool c_comment   = false;
   bool cpp_comment = false;
 
+  if( mIter == mEnd )
+  {
+    return true;
+  }
+
   // skip white space
   char nextChar = 0;
   while(1)
   // skip white space
   char nextChar = 0;
   while(1)