Hi,
While attempting to track down the oddity I posted earlier about
loading GLSL programs from .osg files, I've been digging around the
source for the .osg loading mechanism (It has taken a while but I
think I've finally gotten my head around how the code works), I
spotted what I believe to be a potentially fatal bug on line 890 of
osgDB::Registry.cpp in the v1.2 source.
The line and its previous read:
[889] DotOsgWrapper::ReadFunc rf = mitr->second->getReadFunc();
[890] if (rf && (*rf)(*obj,fr)) iteratorAdvanced = true;
In the event the function pointer rf is set to NULL on line 889; I
believe the if statement on the next line will cause a null pointer
dereference. Should this not be written as:
[890] if (rf) if ((*rf)(*obj,fr)) iteratorAdvanced = true;
...in order to protect from this problem?
Alan.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/