C - How is it possible to ensure that code doesn’t just crash due to a uncaught type error and pointers pointing randomly to memory

I do low-level development. The typechecking in place can be a hassle at times. I can’t remember the last time I saw an error with pointers to be honest and that covers a lot of code written by a lot of prgrammers.

As an example, my Prolog system is 500 lines of assembly code, 20,000 lines of C, and 30,000 lines of Prolog. I did as much as I could in Prolog, and as much as I could in C - so keeping up the abstraction ladder as much as possible. In six years there was not one ‘pointer error’ in that C code. I’m just a normal C programmer.

Edit: Actually, I did have a bug with the garbarge collector. Was it a pointer problem or a me not thinking it through problem?