Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-05-04 15:28:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-05-04 15:30:00 +0300
commite560bbe1d584871ffda3569ac3b4ac1129389e6e (patch)
tree8608648eadceab41f23b89d56c3c1c322811deaa /source/blender/editors/object
parent5a8629c0d7da6cfb4b696f1787111c9492e03aba (diff)
Fix possible crash with datatransfer operator when source object was hidden.
Mismatch in poll and exec funcs when getting active (source) object...
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_data_transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index b39e8470a95..a7802b6a411 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -325,7 +325,7 @@ static bool data_transfer_exec_is_object_valid(
static int data_transfer_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- Object *ob_src = CTX_data_active_object(C);
+ Object *ob_src = ED_object_active_context(C);
ListBase ctx_objects;
CollectionPointerLink *ctx_ob_dst;
@@ -419,7 +419,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
/* Note this context poll is only really partial, it cannot check for all possible invalid cases. */
static int data_transfer_poll(bContext *C)
{
- Object *ob = ED_object_context(C);
+ Object *ob = ED_object_active_context(C);
ID *data = (ob) ? ob->data : NULL;
return (ob && ob->type == OB_MESH && data);
}