title: QFutureIterator::next segfaults
body: <p>I have the following Qt code, which segfaults in <code>next()</code>.
  I looked into the <code>QtConcurrent</code> code and it is not obvious to me, why it fails.</p>
  
  <pre><code>namespace {
      std::tuple&lt;QString, std::exception_ptr&gt; test( const int&amp; data ) {
          return std::make_tuple( QString(), std::exception_ptr() );
      }
  }
  
  void
  start() {
      QVector&lt;int&gt; downloadList;
      downloadList.push_back( 1 );
      downloadList.push_back( 2 );
  
      auto future = QtConcurrent::mapped( downloadList, test );
  
      QFutureIterator&lt;std::tuple&lt;QString, std::exception_ptr&gt;&gt; it( future );
      while( it.hasNext() ) {
          auto&amp; tuple = it.next();
      }
  }
  </code></pre>
  
  <p>The point it fails is:</p>
  
  <pre><code>const T *pointer() const
  {
      if (mapIterator.value().isVector())
  -&gt;      return &amp;(reinterpret_cast&lt;const QVector&lt;T&gt; *&gt;(mapIterator.value().result)-&gt;at(m_vectorIndex));
      else
          return reinterpret_cast&lt;const T *&gt;(mapIterator.value().result);
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Update:</strong></p>
  
  <p>The same crash for <code>QFuture::const_iterator</code>.</p>
  
  <hr>
  
  <p><strong>Note:</strong></p>
  
  <p>If I can believe <em>GDB</em>, <code>this</code> in <code>QVector::at</code>  is <code>0x0</code>. Then I assume that <code>mapIterator.value().result</code> already is a <code>nullptr</code>, why, I have no idea.</p>