summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-18 00:32:33 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-18 00:32:33 +0100
commit7543833037e1e44f8f4b6ce950c4d7833bd93c42 (patch)
treec161113cbcc57d20fbf41faa376117ae2c563c3a /frontends
parent404b522119daf6d49687a304c9fa2693e8e8f81a (diff)
downloadnetsurf-7543833037e1e44f8f4b6ce950c4d7833bd93c42.tar.gz
netsurf-7543833037e1e44f8f4b6ce950c4d7833bd93c42.tar.bz2
Ensure we don't use a half-opened library if it is optional.
Diffstat (limited to 'frontends')
-rw-r--r--frontends/amiga/libs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index d7271896f..c3b1bf98b 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -62,7 +62,7 @@
if(I##PREFIX == NULL) { \
LOG("Failed to get %s interface v%d of %s", INTERFACE, INTVER, LIB); \
if(FAIL == true) { \
- STRPTR error = ASPrintf("Unable to open interface %s v%d\nof %s v%ld (fatal error)", INTERFACE, INTVER, LIB, LIBVER); \
+ STRPTR error = ASPrintf("Unable to open interface %s v%d\nof %s v%ld (fatal error - not an OS4 lib?)", INTERFACE, INTVER, LIB, LIBVER); \
ami_misc_fatal_error(error); \
FreeVec(error); \
return false; \
@@ -80,7 +80,9 @@
#define AMINS_LIB_CLOSE(PREFIX) \
if(I##PREFIX) DropInterface((struct Interface *)I##PREFIX); \
- if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base);
+ if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base); \
+ I##PREFIX = NULL; \
+ PREFIX##Base = NULL;
#define AMINS_LIB_STRUCT(PREFIX) \
struct PREFIX##Base *PREFIX##Base = NULL; \