diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-12 10:55:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-12 10:55:04 +0300 |
commit | 520fb5c8cd3d57e6c2b5676aae73008a1a038300 (patch) | |
tree | 0b003e6c63a209f8b2bfbd53bc12e9b95c9e11e0 /source/blender/windowmanager | |
parent | 4ab47a767067a88cfc82ae2e2214178b90e0f544 (diff) |
Fix T45041: (2.75RC) blender crashes when I choose 'Refresh DataBlock Previews'.
Not sure where this sneaked in, but we for sure need a valid context (otherwise
we'd need to pass a Main alog too).
This is to be backported to final 2.75.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index cd97293516d..c39d0fc2a68 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -4777,6 +4777,7 @@ static void WM_OT_dependency_relations(wmOperatorType *ot) /* *************************** Mat/tex/etc. previews generation ************* */ typedef struct PreviewsIDEnsureStack { + bContext *C; Scene *scene; BLI_LINKSTACK_DECLARE(id_stack, ID *); @@ -4801,7 +4802,7 @@ static bool previews_id_ensure_callback(void *todo_v, ID **idptr, int UNUSED(cd_ if (id && (id->flag & LIB_DOIT)) { if (ELEM(GS(id->name), ID_MA, ID_TE, ID_IM, ID_WO, ID_LA)) { - previews_id_ensure(NULL, todo->scene, id); + previews_id_ensure(todo->C, todo->scene, id); } id->flag &= ~LIB_DOIT; /* Tag the ID as done in any case. */ BLI_LINKSTACK_PUSH(todo->id_stack, id); @@ -4826,6 +4827,7 @@ static int previews_ensure_exec(bContext *C, wmOperator *UNUSED(op)) for (scene = bmain->scene.first; scene; scene = scene->id.next) { preview_id_stack.scene = scene; + preview_id_stack.C = C; id = (ID *)scene; do { |