mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-05 18:00:41 +01:00
CIrrMeshFileLoader::readMeshBuffer avoid accessing pointer before it's not 0 check.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6391 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
dd7020c27b
commit
cc9edcb973
|
@ -276,13 +276,13 @@ void CIrrMeshFileLoader::readIndices(io::IXMLReader* reader, int indexCount, IIn
|
|||
|
||||
void CIrrMeshFileLoader::readMeshBuffer(io::IXMLReader* reader, int vertexCount, CDynamicMeshBuffer* sbuffer)
|
||||
{
|
||||
core::stringc data = reader->getNodeData();
|
||||
const c8* p = &data[0];
|
||||
scene::IVertexBuffer& Vertices = sbuffer->getVertexBuffer();
|
||||
video::E_VERTEX_TYPE vType = Vertices.getType();
|
||||
|
||||
if (sbuffer)
|
||||
{
|
||||
core::stringc data = reader->getNodeData();
|
||||
const c8* p = &data[0];
|
||||
scene::IVertexBuffer& Vertices = sbuffer->getVertexBuffer();
|
||||
video::E_VERTEX_TYPE vType = Vertices.getType();
|
||||
|
||||
for (int i=0; i<vertexCount && *p; ++i)
|
||||
{
|
||||
switch(vType)
|
||||
|
|
Loading…
Reference in New Issue
Block a user