Setting a NULL element to a dictionary, causes plist_to_xml trigger an assert.
I don't think having a key with an empty element in a dict is even legal plist, but in either case assert shouldn't be triggered.
I suggest making the call to plist_dict_set_item(dict, "a", NULL); fail and not adding the key in first place.
Encountered this in the wild during work on futurerestore.
Here is a poc:
Setting a NULL element to a dictionary, causes
plist_to_xml
trigger an assert. I don't think having a key with an empty element in a dict is even legal plist, but in either case assert shouldn't be triggered. I suggest making the call toplist_dict_set_item(dict, "a", NULL);
fail and not adding the key in first place.