<div dir="ltr">Denis,<div><br></div><div style>Try this:</div><div style><br></div><div style>fields = layer.pendingFields()</div><div style>f.setFields(fields)</div><div style><br></div><div style>- Nathan</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Apr 25, 2013 at 5:48 PM, Denis Rouzaud <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
When I write:<br>
<br>
f = QgsFeature()<br>
f.setFields( layer.dataProvider().fields() )<br>
<br>
QGIS crashes<br>
<br>
Here are the two involved methods<br>
<br>
void QgsFeature::setFields ( const QgsFields * fields )<br>
<br>
virtual const QgsFields& QgsVectorDataProvider::fields ( ) const<br>
<br>
<br>
Anybody has an idea??? Did I do something wrong?<br>
<br>
Thanks<br>
<br>
Denis<br>
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</blockquote></div><br></div>