From Julien Valentin, "Serializing custom geometry i ran into a crash due to a setVertexAttribArrayList(array) with array containing NULL vertexAttrib. I added a test in order to avoid it
From Julien Valentin, "Serializing custom geometry i ran into a crash due to a
setVertexAttribArrayList(array) with array containing NULL vertexAttrib.
I added a test in order to avoid it


Code:
void Geometry::setVertexAttribArrayList(const ArrayList& arrayList)
{
    _vertexAttribList = arrayList;

    dirtyDisplayList();

    if (_useVertexBufferObjects)
    {
        for(ArrayList::iterator itr = _vertexAttribList.begin();
            itr != _vertexAttribList.end();
            ++itr)
        {
if(itr->get())//ADDED
            addVertexBufferObjectIfRequired(itr->get());
        }
    }
}
"

and

"The bug i ran into is a crash reading osgt Geometry with null vertexattribs.
The only thing i added is a not nul check on array passed to setVertexAttribArrayList."

--------------------This line, and those below, will be ignored--

M    src/osg/Geometry.cpp


git-svn-id: aa838dfc23441284dd616281de4245daec5d2135@15121 16af8721-9629-0410-8352-f15c8da7e697

tomasthoresen/osg,openscenegraph/osg,tomasthoresen/osg,artoolkit/osg,marchelbling/osg,scrawl/osg,jtorresfabra/osg,tomasthoresen/osg,marchelbling/osg,scrawl/osg,marchelbling/osg,openscenegraph/osg,artoolkit/osg,scrawl/osg,jtorresfabra/osg,openscenegraph/osg,marchelbling/osg,artoolkit/osg,scrawl/osg,artoolkit/osg,jtorresfabra/osg,openscenegraph/osg,tomasthoresen/osg,jtorresfabra/osg