Check range before calling highlightWithColors:fromPoint:toPoint to fix crasher in bug 2490