Hi Robert,

I just get a crash with the trunk with the following code:

node->removeUpdateCallback(MyNodeCallback)

if there is no NodeCallback already set it crashes, if the MyNodeCallback is 0 it crashes too.
So i suggest to add this code:

       inline void removeUpdateCallback(NodeCallback* nc) {
           if (_updateCallback.valid() && nc != 0)
if (_updateCallback == nc) setUpdateCallback(nc->getNestedCallback()); // replace the callback by the nested one
               else _updateCallback->removeNestedCallback(nc);
       }

instead of

       inline void removeUpdateCallback(NodeCallback* nc) {
if (_updateCallback == nc) setUpdateCallback(nc->getNestedCallback()); // replace the callback by the nested one
               else _updateCallback->removeNestedCallback(nc);
       }


Does it make sense for you ?

Cheers,
Cedric

--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[email protected] 
http://www.plopbyte.net


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to