Yes, Cédric, that sounds logical to me (This was a tiny submission of mine). 
However, I'd add some braces for the "if" statement ;)

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Sun, 01 Feb 2009 22:32:29 +0100, Cedric Pinson <[email protected]> a 
écrit:

> 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

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

Reply via email to