diff options
author | Ton Roosendaal <ton@blender.org> | 2003-11-28 23:45:11 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-11-28 23:45:11 +0300 |
commit | 8a5ab806211ad3d13d89081a19e1cab1f1037a9f (patch) | |
tree | ca40571bc2e09895d7d98763571895b5ebcc1ce9 | |
parent | 1edc5959049bfb413c6b487b3745a475b4e7a5f5 (diff) |
- ARGH! breaking the cvs tag for 2.31... but this a true crash which should
have been fixed now we know it.
pressing CTRL+1,2,3,4 was meant to set subdivision levels, but it read
the active pointer without it checking for NULL... tsk!
-rw-r--r-- | source/blender/src/space.c | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/source/blender/src/space.c b/source/blender/src/space.c index afeecbe60b4..b44a38d7a17 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -812,52 +812,43 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) case ONEKEY: ob= OBACT; if(G.qual==LR_CTRLKEY) { - if(G.obedit) { - flip_subdivison(G.obedit, 1); - } - else if(ob->type == OB_MESH) { + if(ob && ob->type == OB_MESH) { flip_subdivison(ob, 1); } } - else - do_layer_buttons(0); break; + else do_layer_buttons(0); + break; + case TWOKEY: ob= OBACT; if(G.qual==LR_CTRLKEY) { - if(G.obedit) { - flip_subdivison(G.obedit, 2); - } - else if(ob->type == OB_MESH) { + if(ob && ob->type == OB_MESH) { flip_subdivison(ob, 2); } } - else - do_layer_buttons(1); + else do_layer_buttons(1); break; + case THREEKEY: ob= OBACT; if(G.qual==LR_CTRLKEY) { - if(G.obedit) { - flip_subdivison(G.obedit, 3); - } - else if(ob->type == OB_MESH) { + if(ob && ob->type == OB_MESH) { flip_subdivison(ob, 3); } } - else - do_layer_buttons(2); break; + else do_layer_buttons(2); + break; + case FOURKEY: ob= OBACT; - if(G.qual & LR_CTRLKEY) { - if(G.obedit) { - flip_subdivison(G.obedit, 4); - } - else if(ob->type == OB_MESH) { + if(G.qual==LR_CTRLKEY) { + if(ob && ob->type == OB_MESH) { flip_subdivison(ob, 4); } } - else - do_layer_buttons(3); break; + else do_layer_buttons(3); + break; + case FIVEKEY: do_layer_buttons(4); break; case SIXKEY: |