Even if "a" is NULL in the assignment below, this assignment does not
cause any AV:
SOME_PTR * someVar = (SOME_PTR *) a->b;
But something like this will cause an AV because "someVar" is NULL:
if (someVar->someType == 1)
{
}
Why does the first assignment not cause any access violation?
cause any AV:
SOME_PTR * someVar = (SOME_PTR *) a->b;
But something like this will cause an AV because "someVar" is NULL:
if (someVar->someType == 1)
{
}
Why does the first assignment not cause any access violation?
Comment