aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index fa1cbfaa..a5b42bdc 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -2380,9 +2380,10 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuf
return VK_ERROR_VALIDATION_FAILED;
}
VkResult result = dev_data->device_dispatch_table->BeginCommandBuffer(commandBuffer, pBeginInfo);
- if (VK_SUCCESS == result) {
- if (CB_NEW != pCB->state)
+ if ((VK_SUCCESS == result) && (pCB != NULL)) {
+ if (CB_NEW != pCB->state) {
resetCB(dev_data, commandBuffer);
+ }
pCB->state = CB_UPDATE_ACTIVE;
updateCBTracking(pCB);
}