Revision: 56943
          http://sourceforge.net/p/brlcad/code/56943
Author:   phoenixyjll
Date:     2013-08-19 08:16:51 +0000 (Mon, 19 Aug 2013)
Log Message:
-----------
Error handling.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/boolean.cpp

Modified: brlcad/trunk/src/libbrep/boolean.cpp
===================================================================
--- brlcad/trunk/src/libbrep/boolean.cpp        2013-08-19 08:03:33 UTC (rev 
56942)
+++ brlcad/trunk/src/libbrep/boolean.cpp        2013-08-19 08:16:51 UTC (rev 
56943)
@@ -835,6 +835,11 @@
        end_idx = trimmedfaces.Count() - 1;
 
     int facecount = brep->m_F.Count();
+    if (end_idx - start_idx + 1 != facecount) {
+       bu_log("build_connectivity_graph() Error: length of [start_idx, 
end_idx] not equal to the face count.\n");
+       return -1;
+    }
+
     // Index of the edges of a face
     ON_ClassArray<ON_SimpleArray<int> > edge_index(facecount);
 
@@ -856,6 +861,7 @@
 
     if (edge_index.Count() != facecount) {
        bu_log("build_connectivity_graph() Error: edge_index.Count() != 
brep->m_F.Count()\n");
+       return -1;
     }
 
     // Find the faces that share an edge

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to