[ox] Fix for GCC pedantry around potential null ptrs that will never happen

This commit is contained in:
2022-07-13 21:19:02 -05:00
parent db3e9c5d93
commit 94e3ed217a
2 changed files with 6 additions and 2 deletions

View File

@@ -122,7 +122,10 @@ class OrganicClawWriter {
ModelHandlerInterface handler{&w};
for (std::size_t i = 0; i < keys.size(); ++i) {
const auto k = keys[i].c_str();
oxReturnError(handler.field(k, val->at(k).value));
if (k) [[likely]] {
oxRequireM(value, val->at(k));
oxReturnError(handler.field(k, value));
}
}
value(key) = w.m_json;
}