Forgot to check for a valid cursor position in glut_ui textbox.