forked from bartvdbraak/blender
2.5
* when reading an old .blend 2.5 crashed on creating input node menu. type->name is for some reason NULL, so add simple check to prevent from happening again.
This commit is contained in:
parent
a1912243b6
commit
ab33f8f0c0
@ -200,7 +200,7 @@ static void node_make_addmenu(bContext *C, int nodeclass, uiBlock *block)
|
|||||||
bNodeType *type;
|
bNodeType *type;
|
||||||
int script=0;
|
int script=0;
|
||||||
for(a=0, type= ntree->alltypes.first; type; type=type->next) {
|
for(a=0, type= ntree->alltypes.first; type; type=type->next) {
|
||||||
if( type->nclass == nodeclass ) {
|
if( type->nclass == nodeclass && type->name) {
|
||||||
if(type->type == NODE_DYNAMIC) {
|
if(type->type == NODE_DYNAMIC) {
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, type->name, 0,
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, type->name, 0,
|
||||||
yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1.0f, (float)(NODE_DYNAMIC_MENU+script), "");
|
yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1.0f, (float)(NODE_DYNAMIC_MENU+script), "");
|
||||||
|
Loading…
Reference in New Issue
Block a user