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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/action.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 7f8ae06a848..365ac2371b8 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -244,7 +244,7 @@ bActionGroup *action_groups_add_new (bAction *act, const char name[])
bActionGroup *agrp;
/* sanity check: must have action and name */
- if (ELEM(NULL, act, name) || (name[0] == 0))
+ if (ELEM(NULL, act, name))
return NULL;
/* allocate a new one */
@@ -252,7 +252,7 @@ bActionGroup *action_groups_add_new (bAction *act, const char name[])
/* make it selected, with default name */
agrp->flag = AGRP_SELECTED;
- strncpy(agrp->name, name, sizeof(agrp->name));
+ strncpy(agrp->name, name[0] ? name : "Group", sizeof(agrp->name));
/* add to action, and validate */
BLI_addtail(&act->groups, agrp);