Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 26570) +++ trunk/src_plugins/propedit/propdlg.c (revision 26571) @@ -357,6 +357,7 @@ { PCB_DAD_DECL(dlg) propdlg_t *ctx = caller_data; + const char *key; int wkey, wval, failed; pcb_hid_dad_buttons_t clbtn[] = {{"Cancel", -1}, {"OK", 0}, {NULL, 0}}; @@ -374,8 +375,12 @@ PCB_DAD_END(dlg); PCB_DAD_AUTORUN("propedit_add", dlg, "Propedit: add new attribute", NULL, failed); - if (failed == 0) { - char *path = pcb_strdup_printf("a/%s", dlg[wkey].default_val.str_value); + key = dlg[wkey].default_val.str_value; + if (key == NULL) key = ""; + while(isspace(*key)) key++; + + if ((failed == 0) && (*key != '\0')) { + char *path = pcb_strdup_printf("a/%s", key); pcb_propsel_set_str(&ctx->pe, path, dlg[wval].default_val.str_value); free(path); prop_refresh(ctx);