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
This commit is contained in:
Sergey Sharybin
2014-02-03 13:51:26 +06:00
parent 65b1ace941
commit a948ae2c51

View File

@@ -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);
}