Commit: a948ae2c5167c49819241572d3aacb4e4bf5b6d7
Author: Sergey Sharybin
Date:   Mon Feb 3 13:51:26 2014 +0600
https://developer.blender.org/rBa948ae2c5167c49819241572d3aacb4e4bf5b6d7

Fixed a possible access to null pointer reference.

Patch by tamerlan311 (Alex Babahin)

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D282

===================================================================

M       source/blender/blenkernel/intern/movieclip.c

===================================================================

diff --git a/source/blender/blenkernel/intern/movieclip.c 
b/source/blender/blenkernel/intern/movieclip.c
index 63d8119..dfa0d30 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -807,6 +807,7 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip 
*clip, MovieClipUser *u
        }
        else {
                cache->postprocessed.undistortion_used = FALSE;
+               postproc_ibuf = IMB_dupImBuf(ibuf);
        }
 
        if (postprocess_flag) {
@@ -815,9 +816,6 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip 
*clip, MovieClipUser *u
                    disable_blue  = postprocess_flag & MOVIECLIP_DISABLE_BLUE,
                    grayscale     = postprocess_flag & 
MOVIECLIP_PREVIEW_GRAYSCALE;
 
-               if (!postproc_ibuf)
-                       postproc_ibuf = IMB_dupImBuf(ibuf);
-
                if (disable_red || disable_green || disable_blue || grayscale)
                        BKE_tracking_disable_channels(postproc_ibuf, 
disable_red, disable_green, disable_blue, 1);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to