bugfix: jerry_get_object_native_pointer: accept NULL for out_native_info_p (#1770)

With the jerry_set_object_native_pointer() the native_info_p is optional, so I think it makes sense that it is optional for the getter as well.

JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
This commit is contained in:
Martijn Thé
2017-04-24 13:52:00 +02:00
committed by László Langó
parent 07c86ece54
commit 1f6b396ebb
2 changed files with 11 additions and 1 deletions
+6 -1
View File
@@ -2032,7 +2032,12 @@ jerry_get_object_native_pointer (const jerry_value_t obj_val, /**< object to get
}
*out_native_pointer_p = native_pointer_p->data_p;
*out_native_info_p = (const jerry_object_native_info_t *) native_pointer_p->info_p;
if (out_native_info_p)
{
*out_native_info_p = (const jerry_object_native_info_t *) native_pointer_p->info_p;
}
return true;
} /* jerry_get_object_native_pointer */