summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-17 23:20:08 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2016-08-17 23:20:08 (GMT)
commit404b522119daf6d49687a304c9fa2693e8e8f81a (patch)
tree812f19ffe723d2d6d6972880eeb5422d2efb91f2
parent2d5db505e70336e56e739d56d8ca358fc6bc4a6a (diff)
downloadnetsurf-404b522119daf6d49687a304c9fa2693e8e8f81a.tar.gz
netsurf-404b522119daf6d49687a304c9fa2693e8e8f81a.tar.bz2
Fail if the library interface doesn't open.
This will happen when attempting to open old 68k libraries with no separate interface file, but may also occur when the interface name or version doesn't exist (although the library version number _should_ prevent that)
-rw-r--r--frontends/amiga/libs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c
index 00facf9..d727189 100644
--- a/frontends/amiga/libs.c
+++ b/frontends/amiga/libs.c
@@ -61,6 +61,12 @@
I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, INTERFACE, INTVER, NULL); \
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); \
+ ami_misc_fatal_error(error); \
+ FreeVec(error); \
+ return false; \
+ } \
} \
} else { \
LOG("Failed to open %s v%d", LIB, LIBVER); \