Validity checks on pointers not working

cazeoj
Wed, 23 Jun 2021 03:48:18 +0000
C++

So basically, I’ve been having trouble with nullptrs in positions where I really shouldn’t be getting errors. This happens in two places; basically I check to see if the pointer is valid, then I reference it. Almost randomly, it will fail and crash the program.

I don’t know if I’m not checking in the right way, or if it’s just something involved with cross references, but it’s really frustrating and it seems almost impossible to track. Any help would be appreciated; attached is an image of one of the two offenders.

4 posts - 1 participant