Had William been killed in battle, rather than Harold, then future generations of Williams family might have invaded, claiming that they should be rightful rules of England, what with the title having been bestowed to William in 1064.
However, I think we've just been absurdly lucky with not being invaded in nearly 1000 years, rather than William taking the throne having much to do with it.