I found that there were references to null pointers in the irrlicht code (using 1.9.0 on openGL ES branch).
This is undefined behaviour and it may causes bugs if the cases occur.
I think it's pretty minor but just so you know:
You can find the offending code snippets bellow:
Code: Select all
core::plane3df& COGLES2Driver::getClipPlane(irr::u32 index) const
{
if (index < UserClipPlane.size())
return UserClipPlane[index].Plane;
else
return *((core::plane3df*)0); // reference from null?
}
//! returns the axis aligned bounding box of this node
const core::aabbox3d<f32>& CSceneManager::getBoundingBox() const
{
_IRR_DEBUG_BREAK_IF(true) // Bounding Box of Scene Manager wanted.
// should never be used.
return *((core::aabbox3d<f32>*)0); // reference from null?
}
const SLight& CNullDriver::getDynamicLight(u32 idx) const
{
if ( idx < Lights.size() )
return Lights[idx];
else
return *((SLight*)0);
}