On Mon, Feb 7, 2011 at 12:40 PM, Federico J. Fernández <[email protected]> wrote: > QgsFeatureList &featureList = this->currentLayer->selectedFeatures();
You only store reference to a temporary list returned by selectedFeatures(). That list is destroyed when that function terminates, so you have an invalid reference. Store the whole list instead, not just that reference: QgsFeatureList featureList = .... ; Your original post actually listed the correct version (without the reference '&'), that's why it wasn't clear where's your problem. By the way, QGIS contains a map tool for merging features (in src/app), so you could save your work by using that code instead of writing similar code again. Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
