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:
-rw-r--r--source/blender/editors/render/render_shading.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc
index d9929025c28..4c885d50b4c 100644
--- a/source/blender/editors/render/render_shading.cc
+++ b/source/blender/editors/render/render_shading.cc
@@ -1124,9 +1124,10 @@ static int view_layer_add_lightgroup_exec(bContext *C, wmOperator *op)
ViewLayer *view_layer = CTX_data_view_layer(C);
char name[MAX_NAME];
- RNA_string_get(op->ptr, "name", name);
+ name[0] = '\0';
/* If a name is provided, ensure that it is unique. */
- if (name[0]) {
+ if (RNA_struct_property_is_set(op->ptr, "name")) {
+ RNA_string_get(op->ptr, "name", name);
/* Ensure that there are no dots in the name. */
BLI_str_replace_char(name, '.', '_');
LISTBASE_FOREACH (ViewLayerLightgroup *, lightgroup, &view_layer->lightgroups) {