diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-30 02:13:24 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-30 02:13:24 +0400 |
commit | 8b7e01b0bbdada3070c52f980a5f610d4a6c98c8 (patch) | |
tree | 1fad44167c6ef3e58543182eb7465b7f45bb65d4 /source/blender | |
parent | 36c756e754742bede9a33ad0fca7c46adc6e56c2 (diff) |
Fix #24018: moving backdrop in node editor not working anymore after thread
safety fixes, was one case where it was still using get_ibuf instead of
acquire/release_ibuf, this is required for render and compositing results
which are modified by other threads.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index b6dc0b4db7c..968391f271e 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -750,12 +750,15 @@ static int snode_bg_viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event) Image *ima; ImBuf *ibuf; int pad= 10; + void *lock; ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node"); - ibuf= BKE_image_get_ibuf(ima, NULL); + ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock); - if(ibuf == NULL) + if(ibuf == NULL) { + BKE_image_release_ibuf(ima, lock); return OPERATOR_CANCELLED; + } nvm= MEM_callocN(sizeof(NodeViewMove), "NodeViewMove struct"); op->customdata= nvm; @@ -766,6 +769,8 @@ static int snode_bg_viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event) nvm->xmax = ar->winx/2 + ibuf->x/2 - pad; nvm->ymin = -(ar->winy/2) - ibuf->y/2 + pad; nvm->ymax = ar->winy/2 + ibuf->y/2 - pad; + + BKE_image_release_ibuf(ima, lock); /* add modal handler */ WM_event_add_modal_handler(C, op); |