Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash when parsing mapbox style with labeling containing mixed li…
…teral and string references

Fixes #46321
  • Loading branch information
nyalldawson committed Dec 3, 2021
1 parent c72f377 commit 5d3a8df
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 29 deletions.
6 changes: 6 additions & 0 deletions src/core/vectortile/qgsmapboxglstyleconverter.cpp
Expand Up @@ -1424,6 +1424,12 @@ void QgsMapBoxGlStyleConverter::parseSymbolLayer( const QVariantMap &jsonLayer,
if ( part.isEmpty() )
continue;

if ( !part.contains( '{' ) )
{
res << QgsExpression::quotedValue( part );
continue;
}

// part will start at a {field} reference
const QStringList split = part.split( '}' );
res << QgsExpression::quotedColumnRef( split.at( 0 ).mid( 1 ) );
Expand Down

0 comments on commit 5d3a8df

Please sign in to comment.