Skip to content

Commit 0ea89de

Browse files
committed
Fix crash when RADV_DEBUG is not set
1 parent 42ef765 commit 0ea89de

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ static void LinuxBreathOfTheWildWorkaround(VkInstance& instance, const VkInstanc
344344

345345
// if the user specified either shader backend, do nothing.
346346
// should parse the flag list but there are currently no other flags containing llvm or aco as a substring
347-
std::string_view debugEnv = getenv("RADV_DEBUG");
347+
const char* debugEnvC = getenv("RADV_DEBUG");
348+
std::string_view debugEnv = debugEnvC != nullptr ? debugEnvC : "";
348349
if (debugEnv.find("aco") != std::string_view::npos || debugEnv.find("llvm") != std::string_view::npos)
349350
return;
350351

0 commit comments

Comments
 (0)