diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-14 06:08:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-14 06:08:40 +0300 |
commit | a980b2f455a70e85f15683435f2ef70f92bbd09b (patch) | |
tree | 9f3f9ba7859dd1537da7537f4c556773603aa65c /source/blender | |
parent | 723e4696860a05018e532b0695177d68a1b5f75e (diff) |
Fix message bus ID remapping
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c b/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c index 6934f15a644..deaac18ba70 100644 --- a/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c +++ b/source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c @@ -145,12 +145,14 @@ static void wm_msg_rna_update_by_id( remove = false; } else { - /* we need to resolve this from the */ + /* We need to resolve this from the new ID pointer. */ PointerRNA idptr; RNA_id_pointer_create(id_dst, &idptr); PointerRNA ptr; - PropertyRNA *prop; - if (!RNA_path_resolve(&idptr, key->msg.params.data_path, &ptr, &prop)) { + PropertyRNA *prop = NULL; + if (RNA_path_resolve(&idptr, key->msg.params.data_path, &ptr, &prop) && + (prop == NULL) == (key->msg.params.prop == NULL)) + { key->msg.params.ptr = ptr; key->msg.params.prop = prop; remove = false; |