[haiku-commits] Re: haiku: hrev47318 - src/apps/terminal

  • From: Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
  • To: <haiku-commits@xxxxxxxxxxxxx>
  • Date: Fri, 6 Jun 2014 10:24:37 +0200

John Scipione <jscipione@xxxxxxxxx> schrieb:
> I don't think using a pointer without checking if it is NULL is a 
> very
> good idea even if you think it can't be NULL, even so, I reverted the
> change.

If you write the code in a way that some pointer should never be NULL, 
it is not a good idea to check for it and then silently ignore the 
NULL. When the pointer is suddendly NULL although it should never be, 
the program *should* crash - otherwise it is then in an undefined state 
and keeps running, and that could result in even worse things.

--
So long, jua

Other related posts: