I am using dynamic_cast in my source to cast pointer as some thing like below,
Base *base = here storing the pointer;
Derived *derived = dynamic_cast<Derived*>(base);
In the case of base doesn't have the pointer of the class hierarchy then cast fails and returns NULL. In next lines I am checking NULL. So no issues.
I came across a crash dump, my application crashed due to the dynamic_cast throws exception.
I know dynamic_cast will throw only when used with reference types.
Any idea when the dynamic_cast can throw exception when used with pointer as I used in above source?