Revision: 55223
          http://sourceforge.net/p/brlcad/code/55223
Author:   n_reed
Date:     2013-04-24 16:36:55 +0000 (Wed, 24 Apr 2013)
Log Message:
-----------
don't add NULL edges to edge_list to avoid segfault when dereferencing elements

Modified Paths:
--------------
    brlcad/trunk/src/conv/step/Path.cpp

Modified: brlcad/trunk/src/conv/step/Path.cpp
===================================================================
--- brlcad/trunk/src/conv/step/Path.cpp 2013-04-24 16:23:56 UTC (rev 55222)
+++ brlcad/trunk/src/conv/step/Path.cpp 2013-04-24 16:36:55 UTC (rev 55223)
@@ -109,8 +109,10 @@
        for (i = l->begin(); i != l->end(); i++) {
            SDAI_Application_instance *entity = (*i);
            if (entity) {
-               OrientedEdge *aOE =dynamic_cast<OrientedEdge 
*>(Factory::CreateObject(sw, entity));
-               edge_list.push_back(aOE);
+               OrientedEdge *aOE = dynamic_cast<OrientedEdge 
*>(Factory::CreateObject(sw, entity));
+               if (aOE) {
+                   edge_list.push_back(aOE);
+               }
            } else {
                std::cerr << CLASSNAME
                          << ": Unhandled entity in attribute 'edge_list'."

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


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to