Skip to content

Commit

Permalink
fix error when trying to get GPU percentage, but GPU is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
stsdc committed Jan 28, 2023
1 parent 9c280fb commit 26b4d9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/Resources.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
}
}

0 comments on commit 26b4d9f

Please sign in to comment.