Bugfix, IRC reported

In texture buttons, changing the preview could crash.
The preview template was accidentally providing a Texture ID where a Material
was meant to be given.

Crash occurred due adding code in material update that checked/cleared node
previews.
This commit is contained in:
Ton Roosendaal
2012-10-27 16:47:08 +00:00
parent 65bc9ee8d0
commit b6da3611eb

View File

@@ -1221,7 +1221,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
else ma = (Material *)pparent;
/* Create RNA Pointer */
RNA_pointer_create(id, &RNA_Material, ma, &material_ptr);
RNA_pointer_create(&ma->id, &RNA_Material, ma, &material_ptr);
col = uiLayoutColumn(row, TRUE);
uiLayoutSetScaleX(col, 1.5);