From 81ae71fcd3ea1406f0bca05471c17d984738ff4c Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Sat, 6 Dec 2014 12:30:59 +0100 Subject: [PATCH] Fix crash in RE_AcquiredResultGet32 on debug builds introduced yesterday --- source/blender/editors/render/render_preview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 42602f35deb..b36e4e22f01 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -561,8 +561,9 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect, unsigned char *rect_byte = MEM_mallocN(rres.rectx * rres.recty * sizeof(int), "ed_preview_draw_rect"); float fx = rect->xmin + offx; float fy = rect->ymin; + if (re) + RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte); - RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte); glaDrawPixelsSafe(fx, fy, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect_byte); MEM_freeN(rect_byte);