Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / interface / interface_eyedropper_datablock.c
index b1e649f4abe304be8eb9012678033a39446679dd..781032ef971f5b7a7a4fc5666b6b609e393ef997 100644 (file)
@@ -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;