diff options
Diffstat (limited to 'src/play-button.c')
-rw-r--r-- | src/play-button.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/play-button.c b/src/play-button.c index 31cdf5a..2ab5fc8 100644 --- a/src/play-button.c +++ b/src/play-button.c @@ -796,7 +796,10 @@ _color_rgb_to_hls (gdouble *r, else s = (max-min)/(2-max-min); - delta = max -min; + delta = (max -min) != 0 ? (max -min) : 1; + + if(delta == 0) + delta = 1; if (red == max) h = (green-blue)/delta; else if (green == max) |