- mGl.DrawElements(GetTopology(currentPipeline->inputAssemblyState.topology),
- static_cast<GLsizei>(cmd.data.draw.drawIndexed.indexCount),
- GL_UNSIGNED_SHORT,
- reinterpret_cast<void*>(cmd.data.draw.drawIndexed.firstIndex));
+ if(currentPipeline)
+ {
+ mGl.DrawElements(GetTopology(currentPipeline->inputAssemblyState.topology),
+ static_cast<GLsizei>(cmd.data.draw.drawIndexed.indexCount),
+ GL_UNSIGNED_SHORT,
+ reinterpret_cast<void*>(cmd.data.draw.drawIndexed.firstIndex));
+ }