diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-04 18:59:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-04 18:59:09 +0300 |
commit | 6753882e42282ccf9dea49bdef2fc5455d852710 (patch) | |
tree | 5cc4fea764a9eb72b05d5c233d3549c52d7c7e02 /source/blender/editors/render | |
parent | 5fafa570d06a920fcbd73b0e5b1944846cce43ed (diff) |
bugfix [#24009] Crash when switching area types and performing ops
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 9db15ee43e5..16bdaae2bf5 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -399,36 +399,38 @@ static int material_slot_de_select(bContext *C, int select) BezTriple *bezt; int a; - for(nu= nurbs->first; nu; nu=nu->next) { - if(nu->mat_nr==ob->actcol-1) { - if(nu->bezt) { - a= nu->pntsu; - bezt= nu->bezt; - while(a--) { - if(bezt->hide==0) { - if(select) { - bezt->f1 |= SELECT; - bezt->f2 |= SELECT; - bezt->f3 |= SELECT; - } - else { - bezt->f1 &= ~SELECT; - bezt->f2 &= ~SELECT; - bezt->f3 &= ~SELECT; + if(nurbs) { + for(nu= nurbs->first; nu; nu=nu->next) { + if(nu->mat_nr==ob->actcol-1) { + if(nu->bezt) { + a= nu->pntsu; + bezt= nu->bezt; + while(a--) { + if(bezt->hide==0) { + if(select) { + bezt->f1 |= SELECT; + bezt->f2 |= SELECT; + bezt->f3 |= SELECT; + } + else { + bezt->f1 &= ~SELECT; + bezt->f2 &= ~SELECT; + bezt->f3 &= ~SELECT; + } } + bezt++; } - bezt++; } - } - else if(nu->bp) { - a= nu->pntsu*nu->pntsv; - bp= nu->bp; - while(a--) { - if(bp->hide==0) { - if(select) bp->f1 |= SELECT; - else bp->f1 &= ~SELECT; + else if(nu->bp) { + a= nu->pntsu*nu->pntsv; + bp= nu->bp; + while(a--) { + if(bp->hide==0) { + if(select) bp->f1 |= SELECT; + else bp->f1 &= ~SELECT; + } + bp++; } - bp++; } } } |