Add the condition check to avoid NULL pointer.
2 files changed