diff options
author | Ton Roosendaal <ton@blender.org> | 2003-08-17 17:42:50 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-08-17 17:42:50 +0400 |
commit | af395ada123b31d743ca0171d07d8f43a930c0df (patch) | |
tree | 3a467f8f0bcd864b0b220a49ba4fd1a3f0ae3a11 /source | |
parent | 3a6581ca22a2faaa25288fd92c0872756aaa42ce (diff) |
- fix bug #479
crash when deleting all curves from Curve Object, when EditButtons open.
Bad memory reference, caused by using an unsupported feature in
interface.c... fixed by not using that feature! (making buttons with NULL
pointers)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/buttons.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/source/blender/src/buttons.c b/source/blender/src/buttons.c index 7737bc61515..7de2a5b28a7 100644 --- a/source/blender/src/buttons.c +++ b/source/blender/src/buttons.c @@ -2133,19 +2133,17 @@ void curvebuts(void) if(ob==G.obedit) { nu= lastnu; - if(nu==0) nu= editNurb.first; - if(nu) sp= &(nu->orderu); - else sp= 0; - uiDefButS(block, NUM, B_SETORDER, "Order U:", 565,91,102, 18, sp, 2.0, 6.0, 0, 0, ""); - if(nu) sp= &(nu->orderv); - else sp= 0; - uiDefButS(block, NUM, B_SETORDER, "V:", 670,91,50, 18, sp, 2.0, 6.0, 0, 0, ""); - if(nu) sp= &(nu->resolu); - else sp= 0; - uiDefButS(block, NUM, B_MAKEDISP, "Resol U:", 565,70,102, 18, sp, 1.0, 128.0, 0, 0, ""); - if(nu) sp= &(nu->resolv); - else sp= 0; - uiDefButS(block, NUM, B_MAKEDISP, "V:", 670,70,50, 18, sp, 1.0, 128.0, 0, 0, ""); + if(nu==NULL) nu= editNurb.first; + if(nu) { + sp= &(nu->orderu); + uiDefButS(block, NUM, B_SETORDER, "Order U:", 565,91,102, 18, sp, 2.0, 6.0, 0, 0, ""); + sp= &(nu->orderv); + uiDefButS(block, NUM, B_SETORDER, "V:", 670,91,50, 18, sp, 2.0, 6.0, 0, 0, ""); + sp= &(nu->resolu); + uiDefButS(block, NUM, B_MAKEDISP, "Resol U:", 565,70,102, 18, sp, 1.0, 128.0, 0, 0, ""); + sp= &(nu->resolv); + uiDefButS(block, NUM, B_MAKEDISP, "V:", 670,70,50, 18, sp, 1.0, 128.0, 0, 0, ""); + } } uiBlockSetCol(block, BUTSALMON); |