Index: src_plugins/lib_gtk_common/wt_layersel.c =================================================================== --- src_plugins/lib_gtk_common/wt_layersel.c (revision 8664) +++ src_plugins/lib_gtk_common/wt_layersel.c (revision 8665) @@ -248,7 +248,7 @@ } ls->com->invalidate_all(); - if (event->button.button == 3) + if ((event->button.button == 3) && (lsl->lid >= 0)) pcb_hid_actionl("Popup", "layer", NULL); break; } @@ -271,7 +271,7 @@ ls->com->invalidate_all(); pcb_gtk_layersel_vis_update(ls); /* need to do a full redraw because of side effects of special layer selections (e.g. Rats') */ } - if (event->button.button == 3) + if ((event->button.button == 3) && (lsl->lid >= 0)) pcb_hid_actionl("Popup", "layer", NULL); break; }