Fixed clang-reported issue: dereference of undefined pointer value.
Corrected a null dereference error.