Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2011-11-22 10:32:52 -0500
committerAndrew Niefer2011-11-22 10:32:52 -0500
commit771097500aa2abe1d82a2d470da75cc8ba79ce89 (patch)
tree11c34befbe0ca844767f2ba4394475b1b073a64e
parentca9e077cbbc71890c98984275742363c0cdae597 (diff)
downloadrt.equinox.framework-771097500aa2abe1d82a2d470da75cc8ba79ce89.tar.gz
rt.equinox.framework-771097500aa2abe1d82a2d470da75cc8ba79ce89.tar.xz
rt.equinox.framework-771097500aa2abe1d82a2d470da75cc8ba79ce89.zip
Bug 353185 - Eclipse crashes on updateSplash at startup when launched by
launchd https://bugs.eclipse.org/bugs/show_bug.cgi?id=353185
-rw-r--r--bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c24
-rw-r--r--bundles/org.eclipse.equinox.executable/library/make_version.mak2
2 files changed, 15 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
index c91f213fc..794395731 100644
--- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
+++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
@@ -118,16 +118,20 @@ static NSWindow* window = nil;
}
for (index = 1; index<=count; index++) {
- NSAppleEventDescriptor *desc = [event descriptorAtIndex:index];
- if (desc) {
- desc = [desc coerceToDescriptorType:typeFSRef];
- CFURLRef url = CFURLCreateFromFSRef(kCFAllocatorDefault, [[desc data] bytes]);
- if (url) {
- NSString *pathName = (NSString *)CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
- [files addObject:pathName];
- [pathName release];
- CFRelease(url);
- }
+ CFURLRef url = NULL;
+ NSAppleEventDescriptor *desc = [event descriptorAtIndex:index], *coerceDesc;
+ if (!desc) continue;
+ if ((coerceDesc = [desc coerceToDescriptorType: typeFSRef]) != NULL) {
+ url = CFURLCreateFromFSRef(kCFAllocatorDefault, [[coerceDesc data] bytes]);
+ } else if ((coerceDesc = [desc coerceToDescriptorType: typeFileURL]) != NULL) {
+ NSData *data = [coerceDesc data];
+ url = CFURLCreateWithBytes(kCFAllocatorDefault, [data bytes], [data length], kCFStringEncodingUTF8, NULL);
+ }
+ if (url) {
+ NSString *pathName = (NSString *)CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
+ [files addObject:pathName];
+ [pathName release];
+ CFRelease(url);
}
}
diff --git a/bundles/org.eclipse.equinox.executable/library/make_version.mak b/bundles/org.eclipse.equinox.executable/library/make_version.mak
index 89d5d1183..8212bb3c7 100644
--- a/bundles/org.eclipse.equinox.executable/library/make_version.mak
+++ b/bundles/org.eclipse.equinox.executable/library/make_version.mak
@@ -10,5 +10,5 @@
#*******************************************************************************
maj_ver=1
-min_ver=500
+min_ver=501
LIB_VERSION = $(maj_ver)$(min_ver)

Back to the top