Hi Carsten,
>> // Following is the method that should be processed when entering a
>node:
>> Action::ResultE CLattice::extendVolume( NodePtr& nod )
>> {
>> // this tests if the core is derived from geometry
>> if( nod->getCore()->getType().isDerivedFrom(Geometry::getClassType())
>)
>> {
>> //...
>> }
>>
>> return Action::Continue;
>> }
>>
>> When testing whether the node has a geometry core, I get a null pointer
>> exception.
>>
>> Somebody see my mistake?
>
> hm, no sorry. Is it possible that you have a Node without NodeCore in
> your scene? If that's the case the nod->getCore()->getType() call would
> crash. Can you provide a backtrace of the crash, so we have a better
> chance of seeing where exactly you get that null pointer?
>
Ok, that's it... I forgot, not every node has a core.
So it's a good idea to test for node core prior to call getType():
if( nod->getCore() == NullFC )
{
return Action::Continue;
}
Thank you
Sven
--
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users