[patch] Don't dereference a null pointer.