fix cppcheck error:
Possible null pointer dereference: tmpMap