Fix #27847: sequencer scene strip rendering crash, due to use of freed

RenderResult.rect. Sergey did all the work to track this down, I'm just
committing a slighty different fix.
This commit is contained in:
Brecht Van Lommel
2011-12-16 22:45:29 +00:00
parent c82fdb8e41
commit 6f24642a2d

View File

@@ -2277,7 +2277,10 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
ibuf->x= rres.rectx;
ibuf->y= rres.recty;
if(ibuf->rect_float!=rectf || rect) /* ensure correct redraw */
/* free rect buffer if float buffer changes, so it can be recreated with
the updated result, and also in case we got byte buffer from sequencer,
so we don't keep reference to freed buffer */
if(ibuf->rect_float!=rectf || rect || !rectf)
imb_freerectImBuf(ibuf);
if(rect)