libedit: Check dereferenced pointer for NULL.