Prevention for being assigned NULL value 23/71723/5
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 27 May 2016 01:14:28 +0000 (10:14 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 30 May 2016 01:00:06 +0000 (10:00 +0900)
 - Pointer 'v8Value' may have NULL value

Change-Id: I5ff68d3b78cab271b443b58bb470985e906b8c6a
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
plugins/dali-script-v8/src/object/property-value-wrapper.cpp

index b160642..f1fad65 100644 (file)
@@ -527,9 +527,15 @@ v8::Local<v8::Object> CreateJavaScriptPrimitive( v8::Isolate* isolate, const Dal
        break;
      }
    }
- v8::Local<v8::Object> ret = v8Value->ToObject();
 
- return handleScope.Escape( ret );
+  v8::Local<v8::Object> ret;
+
+  if( v8Value->IsObject() )
+  {
+    ret = v8Value->ToObject();
+  }
+
+  return handleScope.Escape( ret );
 }