Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16dabc1

Browse files
committed
Fix code in swap chain recreation chapter being out of sync with example code file
1 parent 96ae4c5 commit 16dabc1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

03_Drawing_a_triangle/04_Swap_chain_recreation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ void cleanup() {
9595
vkDestroyCommandPool(device, commandPool, nullptr);
9696

9797
vkDestroyDevice(device, nullptr);
98-
DestroyDebugReportCallbackEXT(instance, callback, nullptr);
98+
99+
if (enableValidationLayers) {
100+
DestroyDebugReportCallbackEXT(instance, callback, nullptr);
101+
}
102+
99103
vkDestroySurfaceKHR(instance, surface, nullptr);
100104
vkDestroyInstance(instance, nullptr);
101105

0 commit comments

Comments
 (0)