diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-27 03:29:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-27 03:29:40 +0400 |
commit | 72499b070ad5e66c9ee0f2df3f58f4e723339e04 (patch) | |
tree | e6b516a9cf8683acaf482169419f58d29622bb37 /source/blender/blenlib/intern/math_color.c | |
parent | f1d3982bf670890b686a200f95ec8008f6d28f23 (diff) |
own recent commits caused crash with the grease pencil in camera view, always pass rv3d argument now.
also found a bug where hex_to_rgb could use un-initialized memory.
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) |