I have a code that checks the condition of a variable.
Sometimes this variable is in memory 0xfdfdfdfd
, and of course it cannot read from there.
If the variable was null, I would
if(!variable)
{
//report error or skip...
}
else
{
//do stuff with the variable...
}
but apparently 0xfdfdfdfd
means that there is a variable, and I just cannot access it.
Is there a check that I can use (like for null), so I do not try to mess with the variable when I cannot access it?