Added an additional null check in VertexBuffer9::discard.

TRAC #22227 Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1599 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 2c4d070c
......@@ -198,6 +198,8 @@ bool VertexBuffer9::setBufferSize(unsigned int size)
bool VertexBuffer9::discard()
{
if (mVertexBuffer)
{
void *dummy;
HRESULT result;
......@@ -216,6 +218,12 @@ bool VertexBuffer9::discard()
}
return true;
}
else
{
ERR("Vertex buffer not initialized.");
return false;
}
}
IDirect3DVertexBuffer9 * VertexBuffer9::getBuffer() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment