diff --git a/libs/libc/symtab/symtab_findbyvalue.c b/libs/libc/symtab/symtab_findbyvalue.c index b1ecdaedb2..86ac081932 100644 --- a/libs/libc/symtab/symtab_findbyvalue.c +++ b/libs/libc/symtab/symtab_findbyvalue.c @@ -62,7 +62,11 @@ symtab_findbyvalue(FAR const struct symtab_s *symtab, int low = 0; #endif - DEBUGASSERT(symtab != NULL); + if (symtab == NULL) + { + DEBUGASSERT(nsyms == 0); + return NULL; + } #ifdef CONFIG_SYMTAB_ORDEREDBYVALUE