[ox/oc] Fix write to ignore null objects passed in

This commit is contained in:
Gary Talent 2020-06-16 04:41:43 -05:00
parent 4f4ec089fd
commit 17762b40b7

View File

@ -100,7 +100,7 @@ Error OrganicClawWriter::field(const char *key, ox::BString<L> *val) {
template<typename T>
Error OrganicClawWriter::field(const char *key, T *val) {
if (targetValid()) {
if (val && targetValid()) {
OrganicClawWriter w;
oxReturnError(model(&w, val));
if (!w.m_json.isNull()) {