Skip to content

Commit

Permalink
[Bugfix] Segfault in rule based labeling from SLD
Browse files Browse the repository at this point in the history
The settings for QgsRuleBasedLabeling::Rule has to be cloned with new QgsPalLayerSettings.
  • Loading branch information
rldhont authored and nyalldawson committed Dec 10, 2019
1 parent 30376b1 commit acf62cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -4252,7 +4252,7 @@ void QgsVectorLayer::readSldLabeling( const QDomNode &node )
childElem = childElem.nextSiblingElement();
}

QgsRuleBasedLabeling::Rule *ruleLabeling = new QgsRuleBasedLabeling::Rule( &settings, scaleMinDenom, scaleMaxDenom, filterExp, label );
QgsRuleBasedLabeling::Rule *ruleLabeling = new QgsRuleBasedLabeling::Rule( new QgsPalLayerSettings( settings ), scaleMinDenom, scaleMaxDenom, filterExp, label );
rootRule->appendChild( ruleLabeling );

ruleElem = ruleElem.nextSiblingElement();
Expand Down

0 comments on commit acf62cd

Please sign in to comment.