Skip to content

Commit

Permalink
fix infinite loop in qgsstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik authored and nyalldawson committed Jul 23, 2021
1 parent e9a1a9b commit 19823b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/symbology/qgsstyle.cpp
Expand Up @@ -2755,6 +2755,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion )
if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion )
{
// skip the symbol, should already be present
e = e.nextSiblingElement();
continue;
}

Expand Down Expand Up @@ -2810,6 +2811,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion )
if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion )
{
// skip the ramp, should already be present
e = e.nextSiblingElement();
continue;
}

Expand Down Expand Up @@ -2859,6 +2861,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion )
if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion )
{
// skip the format, should already be present
e = e.nextSiblingElement();
continue;
}

Expand Down Expand Up @@ -2904,6 +2907,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion )
if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion )
{
// skip the settings, should already be present
e = e.nextSiblingElement();
continue;
}

Expand Down Expand Up @@ -2950,6 +2954,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion )
if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion )
{
// skip the shape, should already be present
e = e.nextSiblingElement();
continue;
}

Expand Down Expand Up @@ -2995,6 +3000,7 @@ bool QgsStyle::importXml( const QString &filename, int sinceVersion )
if ( entityAddedVersion != 0 && sinceVersion != -1 && entityAddedVersion <= sinceVersion )
{
// skip the symbol, should already be present
e = e.nextSiblingElement();
continue;
}

Expand Down

0 comments on commit 19823b7

Please sign in to comment.