fixed a null pointer dereference

Ignore-this: 2d18060273caf37f49d6a32940cc0b9e

darcs-hash:20140121143528-c21fe-e10500adaaebab189b961c9e9bce1f0ca8f4cd3d