David Rose 19 years ago
parent
commit
0bd75ce89b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      panda/src/putil/sparseArray.cxx

+ 3 - 0
panda/src/putil/sparseArray.cxx

@@ -298,6 +298,9 @@ do_add_range(int begin, int end) {
       // The new range straddles two elements, so they get combined.
       // The new range straddles two elements, so they get combined.
       (*si2)._end = (*si)._end;
       (*si2)._end = (*si)._end;
       _subranges.erase(si);
       _subranges.erase(si);
+    } else {
+      // Stop here.
+      break;
     }
     }
     si = si2;
     si = si2;
   }
   }