File radeon-profile.patch of Package radeon-profile

diff --color -rub a/radeon-profile/gpu.cpp b/radeon-profile/gpu.cpp
--- a/radeon-profile/gpu.cpp	2020-11-01 23:08:21.000000000 +0600
+++ b/radeon-profile/gpu.cpp	2021-04-22 17:14:04.353601752 +0600
@@ -69,7 +69,13 @@
 
         int pciIdx = ueventContents.indexOf(QRegExp("PCI_SLOT_NAME.+"));
         if (pciIdx != -1)
-            gsi.name = globalStuff::grabSystemInfo("lspci -s " + ueventContents[pciIdx].split('=')[1])[0].split(':')[2].trimmed();
+        {
+            auto input = globalStuff::grabSystemInfo("lspci -s " + ueventContents[pciIdx].split('=')[1]);
+            if(input.size() < 3)
+                gsi.name = "UNKNOWN";
+            else
+                gsi.name = input[0].split(':')[2].trimmed();
+        }
 
         gpuList.append(gsi);
 
openSUSE Build Service is sponsored by