From 6ee225ed66e8aa4ad2dc541b7e7a719bd6defccb Mon Sep 17 00:00:00 2001 From: jackun Date: Mon, 3 Aug 2020 20:34:40 +0300 Subject: [PATCH] Clear cpu temp hwmon path if no supported sensor is found --- src/cpu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpu.cpp b/src/cpu.cpp index f325e6a7..14d859ea 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -301,10 +301,12 @@ bool CPUStats::GetCpuFile() { } else if (name == "atk0110") { find_temp_input(path, input, "CPU Temperature"); break; + } else { + path.clear(); } } - if (!file_exists(input) && !find_fallback_temp_input(path, input)) { + if (path.empty() || (!file_exists(input) && !find_fallback_temp_input(path, input))) { std::cerr << "MANGOHUD: Could not find cpu temp sensor location" << std::endl; return false; } else {