Browse Source
Merge pull request #742 from rouault/json_object_copy_serializer_data_add_assertion
json_object_copy_serializer_data(): add assertion
tags/json-c-0.16-20220414
Eric Hawicz
GitHub
3 years ago
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
0 deletions
-
json_object.c
|
|
@@ -1588,6 +1588,7 @@ static int json_object_copy_serializer_data(struct json_object *src, struct json |
|
|
|
if (dst->_to_json_string == json_object_userdata_to_json_string || |
|
|
|
dst->_to_json_string == _json_object_userdata_to_json_string) |
|
|
|
{ |
|
|
|
assert(src->_userdata); |
|
|
|
dst->_userdata = strdup(src->_userdata); |
|
|
|
} |
|
|
|
// else if ... other supported serializers ... |
|
|
|