Bad initialisation of std::vector ? : <p>This is how I declare my vector : </p>

<pre><code>  std::vector &lt;Link *&gt; _components;
</code></pre>

<p>Link is this structure : </p>

<pre><code>  struct Link
  {
    size_t targetPin;
    nts::IComponent *component;
  };
</code></pre>

<p>First to initialise it I do </p>

<pre><code>  this-&gt;_components.reserve(2);
</code></pre>

<p>Then, when this instruction happen, it segfault </p>

<pre><code>  this-&gt;_components[0]-&gt;component = this;
</code></pre>

<p>Got an idea ? </p>
