Skip to content

Commit

Permalink
Check if graph first_colour is set before using it as foreground color (
Browse files Browse the repository at this point in the history
  • Loading branch information
livanh authored Feb 3, 2025
1 parent 0a155d7 commit 35c5a05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/conky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1398,8 +1398,10 @@ int draw_each_line_inner(char *s, int special_index, int last_special_applied) {
}
#ifdef BUILD_MATH
if (show_graph_scale.get(*state) && (current->show_scale == 1)) {
// Set the foreground colour to the first colour, ensures the scale text is always drawn in the same colour
set_foreground_color(current->first_colour);
if (current->colours_set) {
// Set the foreground colour to the first colour, ensures the scale text is always drawn in the same colour
set_foreground_color(current->first_colour);
}
int tmp_x = cur_x;
int tmp_y = cur_y;
cur_x += font_ascent() / 2;
Expand Down

0 comments on commit 35c5a05

Please sign in to comment.