diff --git a/src/json.cc b/src/json.cc index 0b86a148..409fddbf 100644 --- a/src/json.cc +++ b/src/json.cc @@ -1192,6 +1192,7 @@ json::iterator json::find(const char* key) { json::iterator result(this); delete result.oi_; + result.oi_ = nullptr; result.oi_ = new object_t::iterator(i); return result; } @@ -1215,6 +1216,7 @@ json::const_iterator json::find(const char* key) const { json::const_iterator result(this); delete result.oi_; + result.oi_ = nullptr; result.oi_ = new object_t::const_iterator(i); return result; }