Fixed a latent crasher discovered by pylint.

Leo build: 20140916190736