3 ms·
> I've seen a null reference crash on "if(foo) foo->bar();" in the past References can't be null. Regardless, that's a valid check for a null pointer and I don
by mmkos 6y ago
> I've seen a null reference crash on "if(foo) foo->bar();" in the past
References can't be null. Regardless, that's a valid check for a null pointer and I don't think what you wrote is at all possible (unless maybe in some multithreaded scenario?).