Fix crash trying to select text in an empty page