diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-07 01:36:26 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-07 01:36:26 +0400 |
commit | f0d9f59e731947de28cfbd7dcac1fa37c7caf956 (patch) | |
tree | 99b21043482750205b835e69e1f74c82780e0473 /source | |
parent | 011749eb081950e075a62662653ea0a315bf8d20 (diff) |
Removed another Malloc from renderwindow callbacks (used while render).
BTW this is most likely bugfix for 2 reports, will verify tomorrow.
BTW2 all credits go to Andrea!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/drawimage.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 3197edf335f..6b1a23c2040 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -1954,6 +1954,7 @@ static void imagewindow_progress(ScrArea *sa, RenderResult *rr, volatile rcti *r /* in render window; display a couple of scanlines of rendered image */ +/* NOTE: called while render, so no malloc allowed! */ static void imagewindow_progress_display_cb(RenderResult *rr, volatile rcti *rect) { @@ -2091,6 +2092,9 @@ static void imagewindow_init_display_cb(RenderResult *rr) areawinset(image_area->win); + if(sima->info_str==NULL) + sima->info_str= MEM_callocN(RW_MAXTEXT, "info str imagewin"); + /* calc location using original size (tiles don't tell) */ sima->centx= (image_area->winx - sima->zoom*(float)rr->rectx)/2.0f; sima->centy= (image_area->winy - sima->zoom*(float)rr->recty)/2.0f; @@ -2131,15 +2135,13 @@ void imagewindow_toggle_render(void) } } +/* NOTE: called while render, so no malloc allowed! */ static void imagewindow_renderinfo_cb(RenderStats *rs) { if(image_area) { SpaceImage *sima= image_area->spacedata.first; - if(sima->info_str==NULL) - sima->info_str= MEM_callocN(RW_MAXTEXT, "info str imagewin"); - if(rs) make_renderinfo_string(rs, sima->info_str); |