diff options
author | Roel Spruit <roel@spruitje.nl> | 2004-01-15 02:04:09 +0300 |
---|---|---|
committer | Roel Spruit <roel@spruitje.nl> | 2004-01-15 02:04:09 +0300 |
commit | f9ed7f0f889880c56b2bdfacc598ad42d0d4dc3e (patch) | |
tree | d1aee2a82ffa20220964bc6011e83a9d8f254061 /source/blender/src/header_view3d.c | |
parent | 8df5de525c06f55a14e2390f24df2de91643af2a (diff) |
Object > Copy Attributes menu items crashed my system if there weren't any objects selected and active. found a if(ob=OBACT) block that caused it. aparently assigment in if statements doesn't always go to well.
Diffstat (limited to 'source/blender/src/header_view3d.c')
-rw-r--r-- | source/blender/src/header_view3d.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 006cd78bf55..fbba7a5846a 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -1280,6 +1280,8 @@ static uiBlock *view3d_edit_object_copyattrmenu(void *arg_unused) block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_copyattrmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); uiBlockSetButmFunc(block, do_view3d_edit_object_copyattrmenu, NULL); + ob= OBACT; + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Location|Ctrl C, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Rotation|Ctrl C, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Size|Ctrl C, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); @@ -1298,7 +1300,7 @@ static uiBlock *view3d_edit_object_copyattrmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Object Constraints|Ctrl C, 11", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, ""); - if ((ob= OBACT)) { + if (ob) { if ((ob->type == OB_MESH) || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) || (ob->type == OB_MBALL)) { |