summarylogtreecommitdiffstats
path: root/qgstyle-infinite-loop.patch
blob: f3501f3dd020be44e605a8600e9e26dc8f23b6cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 19823b76c27c3bfbff1d111cf09af948e8db4367 Mon Sep 17 00:00:00 2001
From: PeterPetrik <zilolv@gmail.com>
Date: Fri, 2 Jul 2021 14:40:59 +0200
Subject: [PATCH] fix infinite loop in qgsstyle

---
 src/core/symbology/qgsstyle.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/core/symbology/qgsstyle.cpp b/src/core/symbology/qgsstyle.cpp
index 6ca37dde3a15..c87305b3c8fa 100644
--- a/src/core/symbology/qgsstyle.cpp
+++ b/src/core/symbology/qgsstyle.cpp
@@ -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;
       }
 
@@ -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;
     }
 
@@ -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;
         }
 
@@ -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;
         }
 
@@ -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;
       }
 
@@ -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;
       }