Browse Source

clipper: Add assertion to silence a static analyzer warning

Turo Lamminen 7 years ago
parent
commit
11fdaa31bc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      contrib/clipper/clipper.cpp

+ 2 - 0
contrib/clipper/clipper.cpp

@@ -43,6 +43,7 @@
 #include <vector>
 #include <vector>
 #include <algorithm>
 #include <algorithm>
 #include <stdexcept>
 #include <stdexcept>
+#include <cassert>
 #include <cstring>
 #include <cstring>
 #include <cstdlib>
 #include <cstdlib>
 #include <ostream>
 #include <ostream>
@@ -2365,6 +2366,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
       //ok, so far it looks like we're still in range of the horizontal edge
       //ok, so far it looks like we're still in range of the horizontal edge
       if ( e->xcurr == horzEdge->xtop && !eMaxPair )
       if ( e->xcurr == horzEdge->xtop && !eMaxPair )
       {
       {
+        assert(horzEdge->nextInLML);
         if (SlopesEqual(*e, *horzEdge->nextInLML, m_UseFullRange))
         if (SlopesEqual(*e, *horzEdge->nextInLML, m_UseFullRange))
         {
         {
           //if output polygons share an edge, they'll need joining later ...
           //if output polygons share an edge, they'll need joining later ...