This is problematic - the parent could be removed between the check for cancellation and the pointer deference.  It's better to pass in the material you need to the job rather than assuming that the callback will be there.