From 08deaa37113d1e1b2ead6b33db3d2436ee27e7ad Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Sat, 28 Jan 2023 18:53:11 +0100 Subject: [PATCH] fix error when trying to get GPU percentage, but GPU is detected --- src/Resources/Resources.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/Resources.vala b/src/Resources/Resources.vala index 24a30b75..20cc6a6b 100644 --- a/src/Resources/Resources.vala +++ b/src/Resources/Resources.vala @@ -86,7 +86,7 @@ public class Monitor.Resources : Object { swap_total = swap.total, network_up = network.bytes_out, network_down = network.bytes_in, - gpu_percentage = gpu.percentage + gpu_percentage = gpu != null ? gpu.percentage : 0 }; } }