MC: fix possible NULL pointer dereference

Avoid NULL pointer scenario found via clang's static analyzer.