Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 12754) +++ trunk/src/thermal.c (revision 12755) @@ -634,6 +634,8 @@ thr = 0; shp = pcb_pstk_shape_at(pcb, ps, layer); + if (shp == NULL) + return NULL; if (!(thr & PCB_THERMAL_ON)) return pcb_thermal_area_pstk_nothermal(pcb, ps, lid, shp);