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:
authorCampbell Barton <ideasman42@gmail.com>2010-01-30 18:44:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-30 18:44:11 +0300
commitd4663166d6c4703d38302a2a80e1d327ff806ab7 (patch)
treeb4198f50cca9da647273aa622da9a83d26ebe19c /source
parentff794b994c36d88fc1ecc0daa9af74484ae0d8cf (diff)
bugfix [#20888] Crash when following instructions on the Blender Wiki and then clicking on the outliner
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 44c943fa4f4..a4a7a7c5bb5 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1491,11 +1491,14 @@ void ui_get_but_string(uiBut *but, char *str, int maxlen)
}
else if(but->type == IDPOIN) {
/* ID pointer */
- ID *id= *(but->idpoin_idpp);
-
- if(id) BLI_strncpy(str, id->name+2, maxlen);
- else BLI_strncpy(str, "", maxlen);
-
+ if(but->idpoin_idpp) { /* Can be NULL for ID properties by python */
+ ID *id= *(but->idpoin_idpp);
+ if(id)
+ BLI_strncpy(str, id->name+2, maxlen);
+ }
+ else {
+ str[0] = '\0';
+ }
return;
}
else if(but->type == TEX) {