diff options
author | Ton Roosendaal <ton@blender.org> | 2005-01-31 21:37:54 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-01-31 21:37:54 +0300 |
commit | 78f133b8a7bc1db280d5d052bf83d7ea959cd1cb (patch) | |
tree | d11f1a84c75be2820736e60239206cac4312ef93 /source/blender/src/drawipo.c | |
parent | 732f608e33df86e973fa3f3c5059a3be0c6cea67 (diff) |
Bug found by Bassam; in certain occasions reading a file calls setscreen()
without the (ugly) global curarea being set.
Fixed the crash in his sample by nicely passing on 'current area' as
argument.
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r-- | source/blender/src/drawipo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 2890a3222b4..8c5b9291236 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -565,21 +565,21 @@ void test_view2d(View2D *v2d, int winx, int winy) } -void calc_scrollrcts(View2D *v2d, int winx, int winy) +void calc_scrollrcts(ScrArea *sa, View2D *v2d, int winx, int winy) { v2d->mask.xmin= v2d->mask.ymin= 0; v2d->mask.xmax= winx; v2d->mask.ymax= winy; - if(curarea->spacetype==SPACE_ACTION) { + if(sa->spacetype==SPACE_ACTION) { v2d->mask.xmin+= ACTWIDTH; v2d->hor.xmin+=ACTWIDTH; } - else if(curarea->spacetype==SPACE_NLA){ + else if(sa->spacetype==SPACE_NLA){ v2d->mask.xmin+= NLAWIDTH; v2d->hor.xmin+=NLAWIDTH; } - else if(curarea->spacetype==SPACE_IPO) { + else if(sa->spacetype==SPACE_IPO) { v2d->mask.xmax-= IPOBUTX; if(v2d->mask.xmax<IPOBUTX) @@ -1642,7 +1642,7 @@ void drawipospace(ScrArea *sa, void *spacedata) uiFreeBlocksWin(&sa->uiblocks, sa->win); /* for panel handler to work */ v2d->hor.xmax+=IPOBUTX; - calc_scrollrcts(G.v2d, sa->winx, sa->winy); + calc_scrollrcts(sa, G.v2d, sa->winx, sa->winy); BIF_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); |