Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-07-07 01:36:26 +0400
committerTon Roosendaal <ton@blender.org>2006-07-07 01:36:26 +0400
commitf0d9f59e731947de28cfbd7dcac1fa37c7caf956 (patch)
tree99b21043482750205b835e69e1f74c82780e0473 /source
parent011749eb081950e075a62662653ea0a315bf8d20 (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.c8
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);