Not all materials have a physical material. If you try to dereference a null physical material (such as on the line switch(Hit.PhysicalMaterial->SurfaceType)) then C++ will crash.
Blueprint has special code in its implementation to test every possible pointer and “do nothing” if it’s null.
1 Like