diff --git a/src/detection/gpu/gpu_linux.c b/src/detection/gpu/gpu_linux.c index a8801cb31..65566cb8a 100644 --- a/src/detection/gpu/gpu_linux.c +++ b/src/detection/gpu/gpu_linux.c @@ -46,6 +46,8 @@ static void pciDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult* gpu, ffStrbufAppendS(pciDir, "/hwmon/"); FF_AUTO_CLOSE_DIR DIR* dirp = opendir(pciDir->chars); + if (!dirp) return; + struct dirent* entry; while ((entry = readdir(dirp)) != NULL) {