Why does this not fail?



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?

.



Relevant Pages

  • Re: Effort driven fixed duration task
    ... You need to make the Task Type Fixed Work to achieve what you want. ... You might like to have a look at my series on Microsoft Project in the ... > amount of work equal to 2 hours so that the first assignment need to ...
    (microsoft.public.project)
  • Re: Effort driven fixed duration task
    ... > Hi Michele, ... > You need to make the Task Type Fixed Work to achieve what you want. ... >> amount of work equal to 2 hours so that the first assignment need to ...
    (microsoft.public.project)
  • Re: Access Violation Problem
    ... CString of a null-terminated string could cause an access violation (if you ... run out of memory, then this could indirectly cause an access violation, ... appears to be caused by the assignment. ...
    (microsoft.public.vc.language)
  • Re: Writing the breakout novel
    ... stimulate their imagination. ... I've noted it in my course calendar for the next presentation. ... time they have to do the first assignment. ...
    (rec.arts.sf.composition)
  • Re: Subclassing Struct.new
    ... first assignment, but to extent their scope to by their outer most ... print foo if foo = bar ... local variable in the same scope. ...
    (comp.lang.ruby)