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)
This commit is contained in:
Chris Young 2016-08-18 00:20:08 +01:00
parent 2d5db505e7
commit 404b522119

View File

@ -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); \