forked from bartvdbraak/blender
Bug fix #2458
Without 3d window, using subsurf setting buttons crashed Blender.
This commit is contained in:
parent
35f4c77d96
commit
44c7cbc083
@ -1095,6 +1095,7 @@ void do_curvebuts(unsigned short event)
|
||||
}
|
||||
/* fallthrough */
|
||||
case B_MAKEDISP:
|
||||
if(G.vd) {
|
||||
if(ob->type==OB_FONT) text_to_curve(ob, 0);
|
||||
makeDispList(ob);
|
||||
if(ob!=G.obedit) { // subsurf with linked dupli will crash
|
||||
@ -1110,6 +1111,7 @@ void do_curvebuts(unsigned short event)
|
||||
}
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWINFO, 1); /* 1, because header->win==0! */
|
||||
}
|
||||
break;
|
||||
|
||||
case B_SUBDIVCURVE:
|
||||
@ -1118,8 +1120,7 @@ void do_curvebuts(unsigned short event)
|
||||
case B_SPINNURB:
|
||||
/* bad bad bad!!! use brackets!!! In case you wondered:
|
||||
{==,!=} goes before & goes before || */
|
||||
if( (G.obedit==0) ||
|
||||
(G.obedit->type!=OB_SURF) ||
|
||||
if( (G.obedit==NULL) || (G.obedit->type!=OB_SURF) || (G.vd==NULL) ||
|
||||
((G.obedit->lay & G.vd->lay) == 0) ) return;
|
||||
spinNurb(0, 0);
|
||||
countall();
|
||||
|
Loading…
Reference in New Issue
Block a user