Fix lock release deadlock when acquiring pass with no data ready yet

There is no reason to do separate image buffer release when there's
found buffer but with empty rects because of the following reasons:

- All the acquire() calls are followed with corresponding release()
  calls, regardless of whether image buffer was empty, missing or
  whatever.

- It was done wrong -- since lock was passed as NULL, it'll only
  de-reference the image buffer itself, this causes following:

  * Wrong user counter since there'll subsequent release() call with
    the proper lock passed to it.
  * Global locks are to be released prior to the spin locks,
    and such an extra release violated this rule.
This commit is contained in:
Sergey Sharybin 2016-01-25 01:25:52 +05:00
parent a224ee00f5
commit d631252109
Notes: blender-bot 2024-01-31 11:35:08 +01:00
Referenced by commit cd047de026, Correction to previous fix of multiple releases of same ImBuf
Referenced by issue #46705, Issues when disabling combined render layer
1 changed files with 0 additions and 2 deletions

View File

@ -119,8 +119,6 @@ ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **r_lock)
if (ibuf) {
if (ibuf->rect || ibuf->rect_float)
return ibuf;
BKE_image_release_ibuf(sima->image, ibuf, NULL);
}
}
else