diff options
author | Ton Roosendaal <ton@blender.org> | 2005-03-01 17:03:59 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-03-01 17:03:59 +0300 |
commit | bd874641a92cd5df46c5797fadecb2745cf347b3 (patch) | |
tree | d3e6e03f0bb6343b944c5c58d5f61c6e6381ea53 /source/blender | |
parent | bc0ca65db8a9e2b1b62c355cf12ca4ffd9877eb9 (diff) |
Bug fix #2260
"Select group, Parent" menu crashed when parent was in other scene.
Simply added extra check in code.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/space.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 6cd90134a86..0ec8b143353 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -555,16 +555,19 @@ void select_parent(void) /* Makes parent active and de-selected OBACT */ while(base) { if(base->object==BASACT->object->parent) { basact=base; break; } base=base->next; - if(base==0) base= FIRSTBASE; + if(base==NULL) base= FIRSTBASE; if(base==startbase) break; } - oldbasact = BASACT; - BASACT = basact; - basact->flag |= SELECT; - - basact->object->flag= basact->flag; - - set_active_base(basact); + /* can be NULL if parent in other scene */ + if(basact) { + oldbasact = BASACT; + BASACT = basact; + basact->flag |= SELECT; + + basact->object->flag= basact->flag; + + set_active_base(basact); + } } |