Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 36739) +++ trunk/src/main.c (revision 36740) @@ -264,6 +264,7 @@ extern void pcb_draw_uninit(void); extern void pcb_board_init(void); extern void pcb_board_uninit(void); +extern void pcb_rats_patch_uninit(void); void pcb_main_init_actions(void) { @@ -302,6 +303,7 @@ pcb_draw_uninit(); pcb_brave_uninit(); pcb_polygon_uninit(); + pcb_rats_patch_uninit(); pcb_text_uninit(); pcb_layer_vis_uninit(); Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 36739) +++ trunk/src/rats_patch.c (revision 36740) @@ -654,4 +654,7 @@ rnd_event_bind(PCB_EVENT_NETLIST_CHANGED, rats_patch_netlist_chg, NULL, core_ratspatch_cookie); } - +void pcb_rats_patch_uninit(void) +{ + rnd_event_unbind_allcookie(core_ratspatch_cookie); +}