My Building Escape after protecting From A Null Pointer lecture

Hi There,

In this lecture, we protect ourselves against a null pointer(a null pointer is a pointer that points to nothing).

VS code-

I just added another check for 0.0 rotation as I just did something that made a door’s rotation 0, so yeah, just added it for sake of checking.

UE Editor-

OpenDoor component added to Sphere(Actor1)-

As you can see, 0.0 rotation and no pressure plate attached-

You’ll see 2 errors in the log.

Previous post: My Building Escape after Using Collision Volumes lecture

Thanks for reading,

1 Like

This is a very key lecture. Protecting your pointers is extremely important ion C++.

1 Like

Indeed it is if don’t protect those pointers, UE will crash without giving any helpful error messages.

Privacy & Terms