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/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 381560fc9ac..60f071f2ad2 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3792,12 +3792,14 @@ void uiButGetStrInfo(bContext *C, uiBut *but, int nbr, ...)
break;
}
}
- if (type == BUT_GET_RNAENUM_IDENTIFIER)
- tmp = BLI_strdup(item->identifier);
- else if (type == BUT_GET_RNAENUM_LABEL)
- tmp = BLI_strdup(item->name);
- else if (item->description && item->description[0])
- tmp = BLI_strdup(item->description);
+ if (item && item->identifier) {
+ if (type == BUT_GET_RNAENUM_IDENTIFIER)
+ tmp = BLI_strdup(item->identifier);
+ else if (type == BUT_GET_RNAENUM_LABEL)
+ tmp = BLI_strdup(item->name);
+ else if (item->description && item->description[0])
+ tmp = BLI_strdup(item->description);
+ }
}
}
else if (type == BUT_GET_OP_KEYMAP) {