Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 14105) +++ trunk/src/obj_subc.c (revision 14106) @@ -1611,3 +1611,8 @@ PCB_END_LOOP; return NULL; } + +pcb_bool pcb_subc_is_empty(pcb_subc_t *subc) +{ + return pcb_data_is_empty(subc->data); +} Index: trunk/src/obj_subc.h =================================================================== --- trunk/src/obj_subc.h (revision 14105) +++ trunk/src/obj_subc.h (revision 14106) @@ -110,6 +110,9 @@ layer that matches brd_layer or brd_layer if not found. */ pcb_layer_t *pcb_loose_subc_layer(pcb_board_t *pcb, pcb_layer_t *brd_layer); +/* Returns whether there's no object in the subc */ +pcb_bool pcb_subc_is_empty(pcb_subc_t *subc); + /*** subc creation helpers ***/ /* Create the aux layer for a subc, set origin to ox;oy and rotation to rot */