From 8871bed5f39d7d8f5c37045293e7c8b1801003a8 Mon Sep 17 00:00:00 2001 From: Tony Barbour Date: Mon, 6 Apr 2015 11:00:38 -0600 Subject: layers: Check for valid pipeline before validating --- layers/draw_state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layers/draw_state.cpp') diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index bbbcb582..a1cb3c36 100644 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -2582,7 +2582,8 @@ XGL_LAYER_EXPORT void XGLAPI xglCmdBeginRenderPass(XGL_CMD_BUFFER cmdBuffer, con addCmd(pCB, CMD_BEGINRENDERPASS); pCB->activeRenderPass = pRenderPassBegin->renderPass; pCB->framebuffer = pRenderPassBegin->framebuffer; - validatePipelineState(pCB, XGL_PIPELINE_BIND_POINT_GRAPHICS, pCB->lastBoundPipeline); + if (pCB->lastBoundPipeline) + validatePipelineState(pCB, XGL_PIPELINE_BIND_POINT_GRAPHICS, pCB->lastBoundPipeline); } else { char str[1024]; sprintf(str, "Attempt to use CmdBuffer %p that doesn't exist!", (void*)cmdBuffer); -- cgit v1.2.3