Index: trunk/src_plugins/export_openems/openems_xml.c =================================================================== --- trunk/src_plugins/export_openems/openems_xml.c (revision 31997) +++ trunk/src_plugins/export_openems/openems_xml.c (revision 31998) @@ -44,8 +44,21 @@ openems_wr_xml_layergrp_end(ctx); rnd_coord_t th; + pcb_layer_t *ly = NULL; + + if (g->len < 0) { + /* shouldn't happen: we are not called for empty layer groups */ + return; + } + ly = pcb_get_layer(ctx->pcb->Data, g->lid[0]); + TODO("Fix hardwired constants"); fprintf(ctx->f, " \n", g->name); + if (ly != NULL) { + fprintf(ctx->f, " \n", ly->meta.real.color.r, ly->meta.real.color.g, ly->meta.real.color.b); + fprintf(ctx->f, " \n", ly->meta.real.color.r, ly->meta.real.color.g, ly->meta.real.color.b); + } + fprintf(ctx->f, " \n"); ctx->cond_sheet_open = 1;