diff --git a/find/parser.c b/find/parser.c
index 23a3374..2a4148a 100644
--- a/find/parser.c
+++ b/find/parser.c
@@ -2759,7 +2759,7 @@ get_num (char *str,
   ok = xstrtoumax (str, pend, 10, num, "") == LONGINT_OK;
   if (ok && fractional_part)
     {
-      if (*pend)
+      if (pend && *pend)
        {
          if ('.'== (**pend))
            {
