Profiles

Node* newProfile = nullptr;

C++ does not do this by default and the code below may keep pointing to invalid memory after the if/else