Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-27 03:29:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-27 03:29:40 +0400
commit72499b070ad5e66c9ee0f2df3f58f4e723339e04 (patch)
treee6b516a9cf8683acaf482169419f58d29622bb37 /source/blender/blenlib
parentf1d3982bf670890b686a200f95ec8008f6d28f23 (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')
-rw-r--r--source/blender/blenlib/intern/math_color.c4
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)