Fix segmentation fault in Image node when change the Layer in EXR files.
The argument in the uiButSetFunc is a Image struct, but BKE_image_multilayer_index expect a RenderResult struct, so when you load a exr file and try change the Layer, Blender crash. (image_layer_cb call BKE_image_multilayer_index)
This commit is contained in:
@@ -1028,7 +1028,7 @@ static int node_composit_buts_image(uiBlock *block, bNodeTree *ntree, bNode *nod
|
||||
bt= uiDefButS(block, MENU, B_NODE_EXEC+node->nr, strp,
|
||||
xmin, dy, width, 19,
|
||||
&iuser->layer, 0.0, 10000.0, 0, 0, "Layer");
|
||||
uiButSetFunc(bt, image_layer_cb, ima, node->storage);
|
||||
uiButSetFunc(bt, image_layer_cb, ima->rr, node->storage);
|
||||
MEM_freeN(strp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user