bug 415302

Patch to protect against null input's.

-=david=-

Signed-off-by: David Harrigan <dharrigan@gmail.com>