diff options
author | Matt Ebb <matt@mke3.net> | 2004-06-05 11:13:05 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2004-06-05 11:13:05 +0400 |
commit | 25c9dd464e4434762e5231910c56c140b7084a85 (patch) | |
tree | 06891f5df1aedb47262f5f84369ad0683e004b12 /source/blender/src/header_action.c | |
parent | 3038507b1bbe084aa6b36592ee1de25ccd4e7518 (diff) |
* Fixed a crash in the action window when attempting to manipulate keys with no action loaded.
This addresses bug #1354 - Thanks to gabio for the report
Diffstat (limited to 'source/blender/src/header_action.c')
-rw-r--r-- | source/blender/src/header_action.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 1581f22be8f..b355efc26eb 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -383,23 +383,33 @@ static uiBlock *action_selectmenu(void *arg_unused) static void do_action_keymenu_transformmenu(void *arg, int event) { + SpaceAction *saction; + bAction *act; Key *key; + key = get_action_mesh_key(); - + saction= curarea->spacedata.first; + + act=saction->action; + switch(event) { case ACTMENU_KEY_TRANSFORM_MOVE: - if (key) { + if (act) { + if (key) { transform_meshchannel_keys('g', key); - } else { + } else { transform_actionchannel_keys ('g'); + } } break; case ACTMENU_KEY_TRANSFORM_SCALE: - if (key) { + if (act) { + if (key) { transform_meshchannel_keys('s', key); - } else { + } else { transform_actionchannel_keys ('s'); + } } break; } @@ -574,19 +584,20 @@ static void do_action_keymenu(void *arg, int event) if (!saction) return; - act = saction->action; key = get_action_mesh_key(); switch(event) { case ACTMENU_KEY_DUPLICATE: - if (key) { - duplicate_meshchannel_keys(key); - } - else { - duplicate_actionchannel_keys(); - remake_action_ipos(act); + if (act) { + if (key) { + duplicate_meshchannel_keys(key); + } + else { + duplicate_actionchannel_keys(); + remake_action_ipos(act); + } } break; @@ -601,8 +612,6 @@ static void do_action_keymenu(void *arg, int event) case ACTMENU_KEY_BAKE: bake_action_with_client (G.saction->action, OBACT, 0.01); break; - - break; } } |