Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 11947) +++ trunk/src/obj_common.c (revision 11948) @@ -178,14 +178,15 @@ const char *pcb_obj_id_invalid(const char *id) { const char *s; - for(s = id; *s != '\0'; s++) { - if (isalnum(*s)) - continue; - switch(*s) { - case '_': case '.': case '$': case ':': continue; + if (id != NULL) + for(s = id; *s != '\0'; s++) { + if (isalnum(*s)) + continue; + switch(*s) { + case '_': case '.': case '$': case ':': continue; + } + return s; } - return s; - } return NULL; }