Not sure what you mean with COM in this case or if it's even relevant to the issue.
Since I see you use new and raw pointers, my guess is, that you're passing somewhere a nullptr without realizing it, which then causes a crash.
I recommend to stick to references whenever possible and use stack allocated objects instead of heap objects and if you really need a pointer, use smart pointers, preferably std::unique_ptr