diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-09-10 14:00:43 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-09-10 14:00:43 +0100 |
commit | ac27a7a650aba27b1dd73eaaffc7629fa1a650e0 (patch) | |
tree | 3d9786c3d1843f829db0882b307f2998e11980d2 /src/play-button.c | |
parent | 9f2da5fe1ce6d18c9df2c36822bcc943cd948794 (diff) | |
download | ayatana-indicator-sound-ac27a7a650aba27b1dd73eaaffc7629fa1a650e0.tar.gz ayatana-indicator-sound-ac27a7a650aba27b1dd73eaaffc7629fa1a650e0.tar.bz2 ayatana-indicator-sound-ac27a7a650aba27b1dd73eaaffc7629fa1a650e0.zip |
merge comments acted upon
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) |