From: Mikko Rasa Date: Mon, 20 Oct 2014 08:57:16 +0000 (+0300) Subject: Don't crash in bounding sphere generation if an object has a null mesh X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=fcb9b3bdb1746f5a5c4b564857c0a2a66fd55765;p=libs%2Fgl.git Don't crash in bounding sphere generation if an object has a null mesh --- diff --git a/source/object.cpp b/source/object.cpp index 9aba5466..d48b0843 100644 --- a/source/object.cpp +++ b/source/object.cpp @@ -62,6 +62,9 @@ void Object::update_bounding_sphere() vector points; for(vector >::const_iterator i=meshes.begin(); i!=meshes.end(); ++i) { + if(!*i) + continue; + const VertexArray &vertices = (*i)->get_vertices(); int offset = vertices.get_format().offset(VERTEX3);