cppcheck (revise IsDescendant() to fix possible null-dereference)

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
7 jobs for cppcheck-fixes in 2 minutes and 3 seconds (queued for 5 seconds)