diff --git a/python/templates/SIOBlock.cc.jinja2 b/python/templates/SIOBlock.cc.jinja2 index 0ed56ef45..f8090ea75 100644 --- a/python/templates/SIOBlock.cc.jinja2 +++ b/python/templates/SIOBlock.cc.jinja2 @@ -25,8 +25,8 @@ void {{ block_class }}::read(sio::read_device& device, sio::version_type version if (not m_subsetColl) { unsigned size(0); device.data( size ); - m_buffers.data = new std::vector<{{ class.full_type }}Data>(size); auto* dataVec = m_buffers.dataAsVector<{{ class.full_type }}Data>(); + dataVec->resize(size); podio::handlePODDataSIO(device, dataVec->data(), size); }