3 ms·
> Avoiding code paths with undefined behavior is something you do all the time. > // Check the pointer before using it > if (p != nullptr) p->DoSomething();
by rileymat2 2y ago
> Avoiding code paths with undefined behavior is something you do all the time.
> // Check the pointer before using it
> if (p != nullptr) p->DoSomething();
I love this example.