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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-05-05 23:04:31 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-05 23:05:09 +0300
commit7efdee75177eb43909e825499330c554d91853f1 (patch)
treeef461608b80955c83721d6317a812f35af38d8ad /source/blender/blenkernel/intern/image_gen.c
parent7b7e7ac4c1a0ba0ca31a26bf3901ec184ae8930a (diff)
Fix crash adding byte color grid images
Diffstat (limited to 'source/blender/blenkernel/intern/image_gen.c')
-rw-r--r--source/blender/blenkernel/intern/image_gen.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c
index 4cbf49e38c2..650ccd456fe 100644
--- a/source/blender/blenkernel/intern/image_gen.c
+++ b/source/blender/blenkernel/intern/image_gen.c
@@ -362,14 +362,16 @@ void BKE_image_buf_fill_checker_color(unsigned char *rect, float *rect_float, in
checker_board_text(rect, rect_float, width, height, 128, 2);
- /* TODO(sergey): Currently it's easier to fill in form buffer and
- * linearize it afterwards. This could be optimized with some smart
- * trickery around blending factors and such.
- */
- IMB_buffer_float_from_float(rect_float, rect_float,
- 4,
- IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB,
- true,
- width, height,
- width, width);
+ if (rect_float != NULL) {
+ /* TODO(sergey): Currently it's easier to fill in form buffer and
+ * linearize it afterwards. This could be optimized with some smart
+ * trickery around blending factors and such.
+ */
+ IMB_buffer_float_from_float(rect_float, rect_float,
+ 4,
+ IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB,
+ true,
+ width, height,
+ width, width);
+ }
}