summaryrefslogtreecommitdiff
path: root/frontends/amiga/libs.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2019-03-17 23:43:47 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2019-03-17 23:43:47 +0000
commitd0a9fc3e35113e8734d10338856a43599f98d50c (patch)
tree4aef51c8a2e05aaa915aaf8c6e0f221e8a78004f /frontends/amiga/libs.c
parent7d402ebc460ec5a11eab526cc52b4d6430496df3 (diff)
downloadnetsurf-d0a9fc3e35113e8734d10338856a43599f98d50c.tar.gz
netsurf-d0a9fc3e35113e8734d10338856a43599f98d50c.tar.bz2
Fix IORequest duplication and ensure library bases are cleared when closed.
Diffstat (limited to 'frontends/amiga/libs.c')
-rw-r--r--frontends/amiga/libs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index cbef3c2fa..7de768b6a 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -113,7 +113,9 @@
#define AMINS_CLASS_CLOSE(PREFIX) \
if(I##PREFIX) DropInterface((struct Interface *)I##PREFIX); \
- if(PREFIX##Base) CloseClass(PREFIX##Base);
+ if(PREFIX##Base) CloseClass(PREFIX##Base); \
+ I##PREFIX = NULL; \
+ PREFIX##Base = NULL;
#define AMINS_CLASS_STRUCT(PREFIX) \
struct ClassLibrary *PREFIX##Base = NULL; \
@@ -136,7 +138,8 @@
}
#define AMINS_LIB_CLOSE(PREFIX) \
- if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base);
+ if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base); \
+ PREFIX##Base = NULL;
#define AMINS_LIB_STRUCT(PREFIX) \
struct PREFIX##Base *PREFIX##Base = NULL;
@@ -156,7 +159,8 @@
}
#define AMINS_CLASS_CLOSE(PREFIX) \
- if(PREFIX##Base) CloseLibrary(PREFIX##Base);
+ if(PREFIX##Base) CloseLibrary(PREFIX##Base); \
+ PREFIX##Base = NULL;
#define AMINS_CLASS_STRUCT(PREFIX) \
struct Library *PREFIX##Base = NULL; \