Fix T55912: saving Viewer Node image error.
Images from viewer node needs the lock parameter...
This commit is contained in:
parent
59b4c67536
commit
08274433e1
Notes:
blender-bot
2023-02-14 10:21:11 +01:00
Referenced by issue #55912, saving Viewer Node image error
|
@ -118,7 +118,9 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
|
|||
|
||||
static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *reports)
|
||||
{
|
||||
ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL);
|
||||
void *lock;
|
||||
|
||||
ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, &lock);
|
||||
if (ibuf) {
|
||||
char filename[FILE_MAX];
|
||||
BLI_strncpy(filename, image->name, sizeof(filename));
|
||||
|
@ -145,7 +147,7 @@ static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *r
|
|||
BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2);
|
||||
}
|
||||
|
||||
BKE_image_release_ibuf(image, ibuf, NULL);
|
||||
BKE_image_release_ibuf(image, ibuf, &lock);
|
||||
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, image);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue