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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-06-19 17:33:47 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-06-19 17:37:23 +0300
commit0116c95d4c9114bc9eae03401c0471fba265cd46 (patch)
tree19874eadddab1b5349cd092b9ec37e6290d02694 /source/blender/editors/interface/interface_icons.c
parenta7e66d89d04662da8a90eab1eb119e8fb8ccaa2b (diff)
Studiolight: Temp Mutex issue
This is a temp fix for a better system. Currently the studiolights can be referenced by a WM_job and being freed via the API. This can happen when removing a studiolight via the interface. As the studiolight has no relation with the job, it is hard to detect if it is still being used. I tried with a Mutex and a Thread Queue but they were failing. So the current temp fix is to keep the studiolights in memory until you close blender. This Must be fixed ASAP! I added this fix so normal cases can workish.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r--source/blender/editors/interface/interface_icons.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 3d0e74a4023..3272e9f14a2 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -882,6 +882,7 @@ void ui_icon_ensure_deferred(const bContext *C, const int icon_id, const bool bi
if (icon->obj_type == ICON_DATA_STUDIOLIGHT) {
if (di->data.buffer.image == NULL) {
IconImage *img = MEM_mallocN(sizeof(IconImage), __func__);
+
img->w = STUDIOLIGHT_ICON_SIZE;
img->h = STUDIOLIGHT_ICON_SIZE;
size_t size = STUDIOLIGHT_ICON_SIZE * STUDIOLIGHT_ICON_SIZE * sizeof(uint);