diff options
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/core_validation.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 09d41a99..32e9f908 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -4754,18 +4754,25 @@ static bool RetireWorkOnQueue(layer_data *dev_data, QUEUE_NODE *pQueue, uint64_t for (auto & wait : submission.waitSemaphores) { auto pSemaphore = getSemaphoreNode(dev_data, wait.semaphore); - pSemaphore->in_use.fetch_sub(1); + if (pSemaphore) { + pSemaphore->in_use.fetch_sub(1); + } auto & lastSeq = otherQueueSeqs[wait.queue]; lastSeq = std::max(lastSeq, wait.seq); } for (auto & semaphore : submission.signalSemaphores) { auto pSemaphore = getSemaphoreNode(dev_data, semaphore); - pSemaphore->in_use.fetch_sub(1); + if (pSemaphore) { + pSemaphore->in_use.fetch_sub(1); + } } for (auto cb : submission.cbs) { auto cb_node = getCBNode(dev_data, cb); + if (!cb_node) { + continue; + } // First perform decrement on general case bound objects DecrementBoundResources(dev_data, cb_node); for (auto drawDataElement : cb_node->drawData) { |
