diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-30 18:44:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-30 18:44:11 +0300 |
commit | d4663166d6c4703d38302a2a80e1d327ff806ab7 (patch) | |
tree | b4198f50cca9da647273aa622da9a83d26ebe19c | |
parent | ff794b994c36d88fc1ecc0daa9af74484ae0d8cf (diff) |
bugfix [#20888] Crash when following instructions on the Blender Wiki and then clicking on the outliner
-rw-r--r-- | source/blender/editors/interface/interface.c | 13 |
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) { |