Hi,
in C I would handle a nullptr problem like that:
if( (myPtr = myFunction()) == NULL)
{
printf("Error@myFunction: myPtr is NULL")
exit(1);
}
My Question:
How would I accomplish something like this in Unreal?
Because all examples I found always show something like this:
if( (myPtr = myFunction()) != NULL)
{
// something with myPtr-> ...
}
I dont understand how this solves the problem when there is code all around which uses myPtr.
Then you always have to check this with an expensive if-branch.