diff options
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper_datablock.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper_datablock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_datablock.c b/source/blender/editors/interface/interface_eyedropper_datablock.c index 2bb575558fc..43ccd65ddf2 100644 --- a/source/blender/editors/interface/interface_eyedropper_datablock.c +++ b/source/blender/editors/interface/interface_eyedropper_datablock.c @@ -190,7 +190,10 @@ static void datadropper_id_sample_pt(bContext *C, DataDropper *ddr, int mx, int } } - if (id) { + PointerRNA idptr; + RNA_id_pointer_create(id, &idptr); + + if (id && RNA_property_pointer_poll(&ddr->ptr, ddr->prop, &idptr)) { BLI_snprintf(ddr->name, sizeof(ddr->name), "%s: %s", ddr->idcode_name, id->name + 2); *r_id = id; |