فهرست منبع

Triangle value is null-error, I don't know why it happened.

copycd 1 سال پیش
والد
کامیت
6bcdf989fb
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      contrib/poly2tri/poly2tri/sweep/sweep.cc

+ 3 - 0
contrib/poly2tri/poly2tri/sweep/sweep.cc

@@ -111,6 +111,9 @@ void Sweep::EdgeEvent(SweepContext& tcx, Edge* edge, Node* node)
 
 void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangle, Point& point)
 {
+  if (triangle == nullptr)
+   return;
+
   if (IsEdgeSideOfTriangle(*triangle, ep, eq)) {
     return;
   }