summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-25 01:12:45 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-25 01:12:45 +0000
commit01050b4415d1f7da5646621980a642c8808684c9 (patch)
treefa975ed1ebd5faa8dfb9a2ce2410059e1b291704
parentbb9d23d04041e4647a2d8c71a98e0bb30defa3ce (diff)
downloadnetsurf-01050b4415d1f7da5646621980a642c8808684c9.tar.gz
netsurf-01050b4415d1f7da5646621980a642c8808684c9.tar.bz2
Ensure we have the class pointer
-rw-r--r--amiga/gui.c2
-rw-r--r--amiga/libs.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index eb60b37d5..392873636 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -5188,7 +5188,7 @@ Object *ami_gui_splash_open(void)
LOG(("WindowBase = %p", WindowBase));
LOG(("WindowObject = %p", win_obj));
- LOG(("BitMapBase = %p", BitMapBase));
+ LOG(("BitMapClass = %p", BitMapClass));
LOG(("BitMapObject = %p", bm_obj));
LOG(("Attempting to open splash window..."));
diff --git a/amiga/libs.c b/amiga/libs.c
index da47010b5..42597f6ef 100644
--- a/amiga/libs.c
+++ b/amiga/libs.c
@@ -86,7 +86,8 @@
LOG(("Failed to get main interface v1 of %s", CLASS)); \
} \
} \
- } else { \
+ } \
+ if(PREFIX##Class == NULL) { \
STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", CLASS, CLASSVER); \
ami_misc_fatal_error(error); \
FreeVec(error); \
@@ -126,7 +127,8 @@
LOG(("Opening %s v%d", CLASS, CLASSVER)); \
if((PREFIX##Base = OpenLibrary(CLASS, CLASSVER))) { \
PREFIX##Class = CLASSGET##_GetClass(); \
- } else { \
+ } \
+ if(PREFIX##Class == NULL) { \
STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", CLASS, CLASSVER); \
ami_misc_fatal_error(error); \
FreeVec(error); \
@@ -137,8 +139,8 @@
if(PREFIX##Base) CloseLibrary(PREFIX##Base);
#define AMINS_CLASS_STRUCT(PREFIX) \
- struct Library *PREFIX##Base; \
- Class *PREFIX##Class;
+ struct Library *PREFIX##Base = NULL; \
+ Class *PREFIX##Class = NULL;
#endif