summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-09-02 17:26:33 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-09-02 17:26:33 +0100
commit2e4bfc5dc3ae3d6c13fbc6f956b611354ed37257 (patch)
treed1140642cbd88ba1bc841867a73f81b77694cfd9
parent61342f4dee1c74bce4096cc5a886231f829388ff (diff)
downloadnetsurf-2e4bfc5dc3ae3d6c13fbc6f956b611354ed37257.tar.gz
netsurf-2e4bfc5dc3ae3d6c13fbc6f956b611354ed37257.tar.bz2
Fix version check
-rw-r--r--amiga/libs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/amiga/libs.c b/amiga/libs.c
index cac028dba..76ac8768e 100644
--- a/amiga/libs.c
+++ b/amiga/libs.c
@@ -77,8 +77,8 @@
if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base);
#define AMINS_LIB_STRUCT(PREFIX) \
- struct PREFIX##Base *PREFIX##Base; \
- struct PREFIX##IFace *I##PREFIX;
+ struct PREFIX##Base *PREFIX##Base = NULL; \
+ struct PREFIX##IFace *I##PREFIX = NULL;
#define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \
LOG("Opening %s v%d", CLASS, CLASSVER); \
@@ -125,7 +125,7 @@
if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base);
#define AMINS_LIB_STRUCT(PREFIX) \
- struct PREFIX##Base *PREFIX##Base;
+ struct PREFIX##Base *PREFIX##Base = NULL;
#define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \
LOG("Opening %s v%d", CLASS, CLASSVER); \
@@ -215,10 +215,10 @@ bool ami_libs_open(void)
AMINS_LIB_OPEN("locale.library", 38, Locale, "main", 1, true)
AMINS_LIB_OPEN("workbench.library", 37, Workbench, "main", 1, true)
- /*\todo This is down here as we need to check the graphics.library version
- * before opening. If it is sufficiently new enough we can avoid using P96
+ /* This is down here as we need to check the graphics.library version
+ * before opening. If it is sufficiently new enough we can avoid using P96.
*/
- if(GfxBase->LibNode.lib_Version >= 54)
+ if(GfxBase->LibNode.lib_Version < 54)
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, false)
/* NB: timer.device is opened in schedule.c (ultimately by the scheduler process).