diff options
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 512086f0e17..ef1d5da56d8 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -194,6 +194,10 @@ void hex_to_rgb(char *hexcol, float *r, float *g, float *b) CLAMP(*g, 0.0f, 1.0f); CLAMP(*b, 0.0f, 1.0f); } + else { + /* avoid using un-initialized vars */ + *r= *g= *b= 0.0f; + } } void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv) |