diff --git a/src/user/user_objects.cc b/src/user/user_objects.cc index 3e4c61bf..9654182c 100644 --- a/src/user/user_objects.cc +++ b/src/user/user_objects.cc @@ -873,10 +873,6 @@ mjCBody& mjCBody::operator+=(const mjCFrame& other) { other.model->suffix = other.suffix; other.model->StoreKeyframes(model); - if (other.prefix.empty() && other.suffix.empty()) { - throw mjCError(this, "either prefix or suffix must be non-empty"); - } - // attach defaults if (other.model != model) { mjCDef* subdef = new mjCDef(*other.model->Default()); @@ -1845,10 +1841,6 @@ mjCFrame& mjCFrame::operator+=(const mjCBody& other) { other.model->prefix = ""; other.model->suffix = ""; - if (other.prefix.empty() && other.suffix.empty()) { - throw mjCError(this, "either prefix or suffix must be non-empty"); - } - mjCBody* subtree = new mjCBody(other, model); other.ForgetKeyframes(); other.model->prefix = subtree->prefix;