Fix (unreported) potential crash.
RNA_pointer_as_string could return NULL instead of a valid string in some cases.
This commit is contained in:
parent
5fe87a0a8c
commit
0f6ed7d111
|
@ -5745,13 +5745,10 @@ char *RNA_pointer_as_string_id(bContext *C, PointerRNA *ptr)
|
|||
|
||||
static char *rna_pointer_as_string__bldata(PointerRNA *ptr)
|
||||
{
|
||||
if (ptr->type == NULL) {
|
||||
if (ptr->type == NULL || ptr->id.data == NULL) {
|
||||
return BLI_strdup("None");
|
||||
}
|
||||
else if (RNA_struct_is_ID(ptr->type)) {
|
||||
if (ptr->id.data == NULL) {
|
||||
return BLI_strdup("None");
|
||||
}
|
||||
return RNA_path_full_ID_py(ptr->id.data);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue