No line for constraint without target

Code notes:

The constraint_has_target can be used to test if a constraint has a target at all.
This commit is contained in:
2003-11-23 20:28:35 +00:00
parent f58d256a9c
commit d3563d23b7
4 changed files with 62 additions and 2 deletions

View File

@@ -491,7 +491,10 @@ static short detect_constraint_loop (Object *owner, const char* substring, int d
case CONSTRAINT_TYPE_TRACKTO:
{
bTrackToConstraint *data = curcon->data;
if (!exist_object(data->tar)) data->tar = NULL;
if (!exist_object(data->tar)) {
data->tar = NULL;
break;
}
if (typefrom != CONSTRAINT_TYPE_TRACKTO && typefrom != CONSTRAINT_TYPE_LOCKTRACK){
if (add_constraint_element (data->tar, data->subtarget, owner, substring)){