Mettle

M0113Dereference of a null pointer

Reported by the compiler as an error or warning.

mettle explain M0113

The pointer was assigned null and never reassigned before this use, so the dereference traps the moment it runs.

Fix: assign a real address first, or guard the access:

if (p != 0) { ... }

Only reported when the null assignment and the use are provably on the same path, so this is a fact rather than a suspicion.

Related