Index: obj_pstk_inlines.h =================================================================== --- obj_pstk_inlines.h (revision 16173) +++ obj_pstk_inlines.h (revision 16174) @@ -213,8 +213,8 @@ /* special case: if thermal says 'no shape' on this layer, omit the shape */ layer = pcb_layer_get_real(layer); - if ((layer != NULL) && (layer->parent != NULL)) { - lid = pcb_layer_id(layer->parent, layer); + if ((layer != NULL) && (layer->parent.data != NULL)) { + lid = pcb_layer_id(layer->parent.data, layer); if (lid < ps->thermals.used) { if ((ps->thermals.shape[lid] & PCB_THERMAL_ON) && ((ps->thermals.shape[lid] & 3) == PCB_THERMAL_NOSHAPE)) return NULL;