This is how I declare my vector :
std::vector <Link *> _components;
Link is this structure :
struct Link
{
size_t targetPin;
nts::IComponent *component;
};
First to initialise it I do
this->_components.reserve(2);
Then, when this instruction happen, it segfault
this->_components[0]->component = this;
Got an idea ?