Fixed a NULL pointer dereference which was introduced by the last patch.