Fix crash in RE_AcquiredResultGet32 on debug builds introduced yesterday

This commit is contained in:
Jens Verwiebe 2014-12-06 12:30:59 +01:00
parent 6e8a8a72a3
commit 81ae71fcd3

@ -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"); unsigned char *rect_byte = MEM_mallocN(rres.rectx * rres.recty * sizeof(int), "ed_preview_draw_rect");
float fx = rect->xmin + offx; float fx = rect->xmin + offx;
float fy = rect->ymin; 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); glaDrawPixelsSafe(fx, fy, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect_byte);
MEM_freeN(rect_byte); MEM_freeN(rect_byte);