bugfix [#20888] Crash when following instructions on the Blender Wiki and then clicking on the outliner

This commit is contained in:
Campbell Barton 2010-01-30 15:44:11 +00:00
parent ff794b994c
commit d4663166d6

@ -1491,11 +1491,14 @@ void ui_get_but_string(uiBut *but, char *str, int maxlen)
}
else if(but->type == IDPOIN) {
/* ID pointer */
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 BLI_strncpy(str, "", maxlen);
if(id)
BLI_strncpy(str, id->name+2, maxlen);
}
else {
str[0] = '\0';
}
return;
}
else if(but->type == TEX) {