Bugfix: Do not error on --release mode

Check for "validation layers" should not panic in `--release` mode
(which is enabled for debug mode).
This commit is contained in:
Stephen Seo 2024-03-12 16:49:15 +09:00
parent 6b3c83d913
commit 1def795b77

View file

@ -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() {