diff options
author | Andrew Niefer | 2007-02-15 19:15:33 +0000 |
---|---|---|
committer | Andrew Niefer | 2007-02-15 19:15:33 +0000 |
commit | be56019afbc9b33b41867d7b8d5f5d121e980c93 (patch) | |
tree | 9491827b5db112e0a58060ce921a62d71a8867bf /bundles/org.eclipse.equinox.executable/library/carbon | |
parent | 43afabae368987f67edb853f4e4208abd63f87f7 (diff) | |
download | rt.equinox.framework-be56019afbc9b33b41867d7b8d5f5d121e980c93.tar.gz rt.equinox.framework-be56019afbc9b33b41867d7b8d5f5d121e980c93.tar.xz rt.equinox.framework-be56019afbc9b33b41867d7b8d5f5d121e980c93.zip |
bug 173786
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/carbon')
-rw-r--r-- | bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c index bf8bbdb3f..ec69c1fb7 100644 --- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c +++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c @@ -103,6 +103,8 @@ int showSplash( const _TCHAR* featureImage ) if(window != NULL) return 0; /*already showing */ + if (featureImage == NULL) + return ENOENT; loadImageFns(); if (createWithURL && createAtIndex) { @@ -212,13 +214,18 @@ char * findVMLibrary( char* command ) { if (start != NULL){ start += 10; end = strchr( start, dirSeparator); - if (end != NULL) { + if (end != NULL && end > start) { length = end - start; - version = malloc(length); + version = malloc(length + 1); strncpy(version, start, length); version[length] = 0; - setenv("JAVA_JVM_VERSION", version, 1); + /*only set a version if it starts with a number */ + if(strtol(version, NULL, 10) != 0 || version[0] == '0') { + setenv("JAVA_JVM_VERSION", version, 1); + } + + free(version); } } return "/System/Library/Frameworks/JavaVM.framework/Versions/Current/JavaVM"; |