layers: Check for valid pipeline before validating
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index bbbcb58..a1cb3c3 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -2582,7 +2582,8 @@
         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);