Fixed a crash while drawing the attitude indicator