Fix potential NPE

Could crash if there was a network error when communicating with the
download server.