Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash
  • Loading branch information
m-kuhn committed Aug 5, 2015
1 parent 504863b commit 9508f8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
Expand Up @@ -282,9 +282,10 @@ void QgsEditorWidgetRegistry::writeMapLayer( QgsMapLayer* mapLayer, QDomElement&

QDomNode editTypesNode = doc.createElement( "edittypes" );

for ( int idx = 0; idx < vectorLayer->fields().count(); ++idx )
QgsFields fields = vectorLayer->fields();
for ( int idx = 0; idx < fields.count(); ++idx )
{
const QgsField &field = vectorLayer->fields()[ idx ];
const QgsField &field = fields[ idx ];
const QString& widgetType = vectorLayer->editorWidgetV2( idx );
if ( !mWidgetFactories.contains( widgetType ) )
{
Expand Down

0 comments on commit 9508f8b

Please sign in to comment.