On 03/09/2019 12:10 PM, ANtlord wrote:
On Saturday, 9 March 2019 at 20:04:53 UTC, Paul Backus wrote:

You can end up with a null `this` reference if you dereference a null pointer to a struct and then call a method on the result. For example:


I can but my reference is not null before calling. Take a look at the line of code [0]. There is a check before the line.

https://github.com/ANtlord/deadmemory/blob/master/src/deadmemory/mem.d#L20 [0]

I haven't run the code but which pointer is null? Try adding this check as well:

  auto node = this.list.getFisrtFreeOrAdd(memViewLen);
  assert(node !is null);

Ali

Reply via email to