Changeset 644


Ignore:
Timestamp:
12/31/16 20:34:10 (7 years ago)
Author:
Maciej Komosinski
Message:

Invalid references from neurons to Parts/Joints? are now reported

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/model.cpp

    r611 r644  
    681681                // attach to part/joint
    682682                if (nu->part_refno >= 0)
     683                        {
    683684                        nu->attachToPart(nu->part_refno);
     685                        if (nu->part==NULL)
     686                                { error_message = SString::sprintf("Invalid reference to Part #%d", nu->part_refno); delete nu; return -1; }
     687                        }
    684688                if (nu->joint_refno >= 0)
     689                        {
    685690                        nu->attachToJoint(nu->joint_refno);
     691                        if (nu->joint==NULL)
     692                                { error_message = SString::sprintf("Invalid reference to Joint #%d", nu->joint_refno); delete nu; return -1; }
     693                        }
    686694                if (srcrange) nu->setMapping(*srcrange);
    687695                // todo: check part/joint ref#
Note: See TracChangeset for help on using the changeset viewer.