From 1def795b77b6fe2c91a296f21b9f9018c92d8608 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 12 Mar 2024 16:49:15 +0900 Subject: [PATCH] Bugfix: Do not error on `--release` mode Check for "validation layers" should not panic in `--release` mode (which is enabled for debug mode). --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index bb830ed..ec17262 100644 --- a/src/main.rs +++ b/src/main.rs @@ -311,9 +311,7 @@ impl VulkanApp { fn setup_debug_messenger(&mut self) -> Result<(), String> { if !ENABLE_VALIDATION_LAYERS { - return Err(String::from( - "Cannot setup debug messenger if validation layers is not enabled!", - )); + return Ok(()); } if self.vk_instance.is_null() {