home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!pbinfo!tron
- From: tron@uni-paderborn.de (Matthias Scheler)
- Subject: Re: FreeGadgets() causes Enforcer hit??
- Message-ID: <1992Sep2.113044.7994@uni-paderborn.de>
- Sender: news@uni-paderborn.de (News Uni-Paderborn)
- Nntp-Posting-Host: corinth
- Organization: Uni-GH Paderborn
- References: <1992Sep1.175239.12472@miavx1.acs.muohio.edu>
- Date: Wed, 2 Sep 1992 11:30:44 GMT
- Lines: 29
-
- jwwalden@miavx1.acs.muohio.edu (P'relan) writes:
-
- >I have a bit of a problem with some code I'm working on, and hope someone on
- >the net could help. It seems that either I'm doing something wrong, or that
- >asl.library's FreeGadgets() function is causing an Enforcer hit. Here is the
- >function in question:
-
- >void FreeWindow(struct Window *wind) {
-
- >struct Menu *men;
- >struct Gadget *glist;
-
- >men = wind->MenuStrip;
- >glist = wind->FirstGadget;
-
- >if (men) {
- > ClearMenuStrip(wind);
- > FreeMenus(men);
- > }
- >CloseWindow(wind);
- >if (glist) FreeGadgets(glist); <----- This line causes hit.
- >}
-
- You MUST call FreeGadgets() on the pointer returned by CreateContext().
- You possibly call FreeGadgets() on one of the already deleted system
- gadgets.
- --
- Matthias Scheler tron@uni-paderborn.de
- University of Paderborn (Germany)
-