diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index 569fff016abe..865af8930a5c 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -141,6 +141,8 @@ class NativeDataIter : public dmlc::Parser { block_.offset = dmlc::BeginPtr(offset_); block_.label = dmlc::BeginPtr(label_); block_.weight = dmlc::BeginPtr(weight_); + block_.qid = nullptr; + block_.field = nullptr; block_.index = dmlc::BeginPtr(index_); block_.value = dmlc::BeginPtr(value_); bytes_read_ += offset_.size() * sizeof(size_t) +