Select your entire map and check if a purple sphere appears at the end of the line.
If it does, this indicates that a brush entity has its origin out in the void.
You can try to find the specific brush entity, or you can keep your entire map selected and go to Tools > Center Origins to center the origin of all brush entities in your map.
This may break stuff if you have a brush entity whose origin you've intentionally moved (such as a rotating door).