Buttons could crash on wrong scene layer index... not sure how that index

can get wrong, but secure code is always OK. :)
This commit is contained in:
Ton Roosendaal
2006-02-23 21:38:48 +00:00
parent 0ec3791d2d
commit 1612f6b392

View File

@@ -1832,6 +1832,11 @@ static void render_panel_layers(void)
SceneRenderLayer *srl= BLI_findlink(&G.scene->r.layers, G.scene->r.actlay);
char *strp;
if(srl==NULL) {
G.scene->r.actlay= 0;
srl= G.scene->r.layers.first;
}
block= uiNewBlock(&curarea->uiblocks, "render_panel_layers", UI_EMBOSS, UI_HELV, curarea->win);
uiNewPanelTabbed("Output", "Render");
if(uiNewPanel(curarea, block, "Render Layers", "Render", 320, 0, 318, 204)==0) return;