mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-18 16:49:18 +03:00
Ensure we have the class pointer
This commit is contained in:
parent
bb9d23d040
commit
01050b4415
@ -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..."));
|
||||
|
10
amiga/libs.c
10
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user