Show
Ignore:
Timestamp:
09/04/15 16:35:03 (less than one hour ago)
Author:
robert
Message:

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."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgQt/QWebViewImage

    r12139 r13482  
    1818#if !defined(OSGQT_LIBRARY) && !defined(OSG_LIBRARY_STATIC) 
    1919 
    20 #include <QtWebKit/QtWebKit> 
     20#if QT_VERSION >= 0x050000 
     21# include <QtWebKitWidgets> 
     22#else 
     23# include <QtWebKit> 
     24#endif 
     25 
    2126 
    2227#include <osgWidget/Browser>