Fix #22189: fields rendering crashes.

This commit is contained in:
Brecht Van Lommel
2010-07-05 09:31:24 +00:00
parent d9e9aa1e4d
commit 51e74c26f7

View File

@@ -508,11 +508,14 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs)
rr= RE_AcquireResultRead(rj->re);
/* malloc OK here, stats_draw is not in tile threads */
if(rr->text==NULL)
rr->text= MEM_callocN(IMA_MAX_RENDER_TEXT, "rendertext");
if(rr) {
/* malloc OK here, stats_draw is not in tile threads */
if(rr->text==NULL)
rr->text= MEM_callocN(IMA_MAX_RENDER_TEXT, "rendertext");
make_renderinfo_string(rs, rj->scene, rr->text);
}
make_renderinfo_string(rs, rj->scene, rr->text);
RE_ReleaseResult(rj->re);
/* make jobs timer to send notifier */