Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed: don't crash on missing core, warn instead

git-svn-id: https://opensg.vrsource.org/svn/trunk@2242 4683daeb-ad0f-0410-a623-93161e962ae5
  • Loading branch information...
commit f9befddf03673433cc3386dcf1af4819e736872a 1 parent 453ff8b
cneumann authored
Showing with 22 additions and 2 deletions.
  1. +22 −2 Source/System/GraphOp/OSGSingleTypeGraphOp.inl
24 Source/System/GraphOp/OSGSingleTypeGraphOp.inl
View
@@ -78,8 +78,18 @@ SingleTypeGraphOp<Type>::~SingleTypeGraphOp(void)
template < class Type > inline
Action::ResultE SingleTypeGraphOp<Type>::traverseEnter(Node *node)
{
- if(node->getCore()->getType().isDerivedFrom(Type::getClassType()))
+ NodeCore *core = node->getCore();
+
+ if(core != NULL && core->getType().isDerivedFrom(Type::getClassType()))
+ {
travNodeEnter(node);
+ }
+ else if(core == NULL)
+ {
+ SWARNING << "SingleTypeGraphOp<>::traverseEnter: Core is NULL."
+ << std::endl;
+ }
+
return Action::Continue;
}
@@ -88,8 +98,18 @@ Action::ResultE SingleTypeGraphOp<Type>::traverseLeave(
Node *node,
Action::ResultE)
{
- if(node->getCore()->getType().isDerivedFrom(Type::getClassType()))
+ NodeCore *core = node->getCore();
+
+ if(core != NULL && core->getType().isDerivedFrom(Type::getClassType()))
+ {
travNodeLeave(node);
+ }
+ else if(core == NULL)
+ {
+ SWARNING << "SingleTypeGraphOp<>::traverseLeave: Core is NULL."
+ << std::endl;
+ }
+
return Action::Continue;
}
Please sign in to comment.
Something went wrong with that request. Please try again.