From 69190612a1f5a43e77525f7cd5698e21b8cc5a25 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Tue, 21 Dec 2021 16:40:07 +0100 Subject: [PATCH] [v0.20] Fix segfault when Intel iGPU is found but not supported --- src/intel/intel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/intel.cpp b/src/intel/intel.cpp index b750ac1..8a55016 100644 --- a/src/intel/intel.cpp +++ b/src/intel/intel.cpp @@ -25,6 +25,12 @@ struct gpu_info* get_gpu_info_intel() { } gpu->arch = get_uarch_from_pci(gpu->pci); + + if(gpu->arch == NULL) { + // No Intel iGPU found in arch LUT, which means it is not supported + return NULL; + } + gpu->name = get_name_from_uarch(gpu->arch); gpu->topo_i = get_topology_info(gpu->arch); gpu->freq = get_max_freq_from_file(gpu->pci);