From 17762b40b73d4f07ed84fc0a63b0dc7574515de2 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 16 Jun 2020 04:41:43 -0500 Subject: [PATCH] [ox/oc] Fix write to ignore null objects passed in --- deps/ox/src/ox/oc/write.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ox/src/ox/oc/write.hpp b/deps/ox/src/ox/oc/write.hpp index bf181880..365392f9 100644 --- a/deps/ox/src/ox/oc/write.hpp +++ b/deps/ox/src/ox/oc/write.hpp @@ -100,7 +100,7 @@ Error OrganicClawWriter::field(const char *key, ox::BString *val) { template Error OrganicClawWriter::field(const char *key, T *val) { - if (targetValid()) { + if (val && targetValid()) { OrganicClawWriter w; oxReturnError(model(&w, val)); if (!w.m_json.isNull()) {