//----------------------------------------------------------------------------
bool Element::accept(EventVisitor& visitor)
{
+ if( !_transform.valid() )
+ return false;
+
return visitor.apply(*this);
}
{
if( parent == _node && child->getNameString() == NAME_TRANSFORM )
{
+ if( !_transform.valid() )
+ return;
+
if( child->getIndex() >= static_cast<int>(_transform_types.size()) )
{
SG_LOG
if( getChildFactory(node->getNameString()) )
{
+ if( !_transform.valid() )
+ // If transform is destroyed also all children are destroyed, so we can
+ // not do anything here.
+ return;
+
ElementPtr child = getChild(node);
if( !child )
SG_LOG
//----------------------------------------------------------------------------
ElementPtr Group::getChildByIndex(size_t index) const
{
+ assert(_transform.valid());
OSGUserData* ud =
static_cast<OSGUserData*>(_transform->getChild(index)->getUserData());
+ assert(ud);
return ud->element;
}