Ensure we have the class pointer

This commit is contained in:
Chris Young 2015-01-25 01:12:45 +00:00
parent bb9d23d040
commit 01050b4415
2 changed files with 7 additions and 5 deletions

View File

@ -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..."));

View File

@ -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