With all the crash related debugging Ive been doing lately, I noticed with a number of the crashes that the related Object sometimes had a Name of “None”.
(Specifically, Access None crashes that are already behind a IsValid() check)
I read somewhere(I think a comment line in the SpawnActor code, IIRC) that this shouldn’t happen because Actors are supposed to automatically be given a name based on their class and a unique number(which matches up with what Ive seen of their names at runtime). So I decided to try putting a check filter in my custom validator function:
TempActor->GetName() != "None"
(obviously TempActor is validated first so as not to run afoul of calling GetName())
It seems to work fine enough(meaning Ive not seen a Name = None related crash since then), but Im not sure if this is 1) Not actually doing anything, and the lack of crashes is just that I haven’t seen one yet, or 2) might cause some problems in functionality elsewhere Im not aware of (tho again it doesn’t appear to so far).
So my question is if there is any reason I shouldn’t be doing that kind of “is valid” check?
Are there situations in the Engine’s code, that my code would be interacting with, where an Actor/Object is suppose to exist without a Name?