Przeglądaj źródła

clipper: Add assertion to silence a static analyzer warning

Turo Lamminen 7 lat temu
rodzic
commit
76de3e0828
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      contrib/clipper/clipper.cpp

+ 1 - 0
contrib/clipper/clipper.cpp

@@ -2431,6 +2431,7 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
     if ( horzEdge->outIdx >= 0 )
     if ( horzEdge->outIdx >= 0 )
       IntersectEdges( horzEdge, eMaxPair,
       IntersectEdges( horzEdge, eMaxPair,
       IntPoint(horzEdge->xtop, horzEdge->ycurr), ipBoth);
       IntPoint(horzEdge->xtop, horzEdge->ycurr), ipBoth);
+    assert(eMaxPair);
     if (eMaxPair->outIdx >= 0) throw clipperException("ProcessHorizontal error");
     if (eMaxPair->outIdx >= 0) throw clipperException("ProcessHorizontal error");
     DeleteFromAEL(eMaxPair);
     DeleteFromAEL(eMaxPair);
     DeleteFromAEL(horzEdge);
     DeleteFromAEL(horzEdge);