From 0ea89de990b9b944c2c06ee1bbb12028e8fa1911 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:44:10 +0200 Subject: [PATCH] Fix crash when RADV_DEBUG is not set --- src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp index 65181506..9af7c09d 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp @@ -344,7 +344,8 @@ static void LinuxBreathOfTheWildWorkaround(VkInstance& instance, const VkInstanc // if the user specified either shader backend, do nothing. // should parse the flag list but there are currently no other flags containing llvm or aco as a substring - std::string_view debugEnv = getenv("RADV_DEBUG"); + const char* debugEnvC = getenv("RADV_DEBUG"); + std::string_view debugEnv = debugEnvC != nullptr ? debugEnvC : ""; if (debugEnv.find("aco") != std::string_view::npos || debugEnv.find("llvm") != std::string_view::npos) return;