home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cbmvax!cbmehq!cbmger!edohwg!heinz
- From: heinz@edohwg.adsp.sub.org (Heinz Wrobel)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Enforcer hits at 0000000
- Message-ID: <heinz.05es@edohwg.adsp.sub.org>
- Date: 10 Dec 92 19:28:42 GMT
- References: <1g56slINN1p2a@rs1.rrz.Uni-Koeln.DE>
- Organization: Edotronik GmbH
- Lines: 24
-
- In article <1g56slINN1p2a@rs1.rrz.Uni-Koeln.DE> ad010@rrz.uni-koeln.de (Wilhelm Stiefelhagen) writes:
- >Hello Guys,
- >
- >Last week I tested my Amiga-Programms with Enforcer. I got a lot of
- >Enfercer hits of programs reading at adress 00000000. Some of the
- >programs are candidates for crashes, some are not.
- >Is this enforcer hit so common, and what is the reason?
-
- You probably use pointer variables without checking for a NULL pointer
- beforehand. This is often not deadly but _REALLY_ ugly and should be fixed.
- Never ever use a pointer without checking it. This is _especially_
- important with return values of system functions like AllocMem() or
- OpenWindow(). Of course it apllies to everything else, too. If you don't
- check the value you don't know what actually happened.
-
- >Willi
-
- --
- Heinz Wrobel, Edotronik GmbH (ECG018)
- FAX +49 89 850 51 25 / TEL +49 89 850 25 20 (HOME!&VOICE, sometimes...)
- Path: cbmehq!cbmger!edohwg!heinz@cbmvax.commodore.com
- "It's good to have a mouse, it's faster if you can do without one..."
- "He who doesn't develop with an A2024 doesn't know about font independent
- user interfaces..."
-