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:
Diego Borghetti
2008-02-29 19:19:31 +00:00
parent cffb9551db
commit 0b1ed4c0cd

View File

@@ -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);
}
}