From fcb9b3bdb1746f5a5c4b564857c0a2a66fd55765 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 20 Oct 2014 11:57:16 +0300 Subject: [PATCH] Don't crash in bounding sphere generation if an object has a null mesh --- source/object.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.43.0