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>2013-12-17 06:19:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-17 06:19:54 +0400
commitcda89813dfc2261cd65822d26df8061a3097c85e (patch)
treebc29929335d34664859f5139a5ac3f6391676462 /source/blender/blenkernel/intern/brush.c
parent305fc825419be427cff26d815eb60ee2cd7d736c (diff)
Fix for possible NULL pointer use in brush image sampling
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 8a59aab4036..f8fa549fcd9 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -644,7 +644,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br,
if (br->mtex.tex->type == TEX_IMAGE && br->mtex.tex->ima) {
ImBuf *tex_ibuf = BKE_image_pool_acquire_ibuf(br->mtex.tex->ima, &br->mtex.tex->iuser, pool);
/* For consistency, sampling always returns color in linear space */
- if (tex_ibuf->rect_float == NULL) {
+ if (tex_ibuf && tex_ibuf->rect_float == NULL) {
IMB_colormanagement_colorspace_to_scene_linear_v3(rgba, tex_ibuf->rect_colorspace);
}
BKE_image_pool_release_ibuf(br->mtex.tex->ima, tex_ibuf, pool);