Fix for a crash related to the feature edge detection at material boundaries.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 6 Jun 2010 18:18:39 +0000 (18:18 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 6 Jun 2010 18:18:39 +0000 (18:18 +0000)
source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp

index aca7334d0457e23c7748f0db53d0124c31bd56cf..16c38c63813a8e7d19f34eba2bb8a26a8d20d41a 100755 (executable)
@@ -700,7 +700,9 @@ void FEdgeXDetector::processMaterialBoundaryShape(WXShape* iWShape) {
 void FEdgeXDetector::ProcessMaterialBoundaryEdge(WXEdge *iEdge)
 {
   // check whether the edge is a material boundary?
-  if(iEdge->GetaFace()->frs_materialIndex() != iEdge->GetbFace()->frs_materialIndex()){
+  WFace *aFace = iEdge->GetaFace();
+  WFace *bFace = iEdge->GetbFace();
+  if(aFace && bFace && aFace->frs_materialIndex() != bFace->frs_materialIndex()){
     iEdge->AddNature(Nature::MATERIAL_BOUNDARY);
   }
 }