Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2004-06-05 11:13:05 +0400
committerMatt Ebb <matt@mke3.net>2004-06-05 11:13:05 +0400
commit25c9dd464e4434762e5231910c56c140b7084a85 (patch)
tree06891f5df1aedb47262f5f84369ad0683e004b12 /source
parent3038507b1bbe084aa6b36592ee1de25ccd4e7518 (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')
-rw-r--r--source/blender/src/editaction.c48
-rw-r--r--source/blender/src/header_action.c37
2 files changed, 50 insertions, 35 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 1f3f5266e29..780eaca7f5b 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -2327,26 +2327,30 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case DKEY:
- if (key) {
- if (G.qual & LR_SHIFTKEY && mval[0]>ACTWIDTH) {
- duplicate_meshchannel_keys(key);
+ if (act) {
+ if (key) {
+ if (G.qual & LR_SHIFTKEY && mval[0]>ACTWIDTH) {
+ duplicate_meshchannel_keys(key);
+ }
}
- }
- else {
- if (G.qual & LR_SHIFTKEY && mval[0]>ACTWIDTH){
- duplicate_actionchannel_keys();
- remake_action_ipos(act);
+ else {
+ if (G.qual & LR_SHIFTKEY && mval[0]>ACTWIDTH){
+ duplicate_actionchannel_keys();
+ remake_action_ipos(act);
+ }
}
}
break;
case GKEY:
- if (mval[0]>=ACTWIDTH) {
- if (key) {
- transform_meshchannel_keys('g', key);
- }
- else {
- transform_actionchannel_keys ('g');
+ if (act) {
+ if (mval[0]>=ACTWIDTH) {
+ if (key) {
+ transform_meshchannel_keys('g', key);
+ }
+ else {
+ transform_actionchannel_keys ('g');
+ }
}
}
break;
@@ -2380,13 +2384,15 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
break;
- case SKEY:
- if (mval[0]>=ACTWIDTH) {
- if (key) {
- transform_meshchannel_keys('s', key);
- }
- else {
- transform_actionchannel_keys ('s');
+ case SKEY:
+ if (act) {
+ if (mval[0]>=ACTWIDTH) {
+ if (key) {
+ transform_meshchannel_keys('s', key);
+ }
+ else {
+ transform_actionchannel_keys ('s');
+ }
}
}
break;
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;
}
}