summaryrefslogtreecommitdiff
path: root/frontends/amiga/libs.c
diff options
context:
space:
mode:
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; \