diff --git a/Source/NSBundle.m b/Source/NSBundle.m index dc479eb7e..56ba03551 100644 --- a/Source/NSBundle.m +++ b/Source/NSBundle.m @@ -529,7 +529,7 @@ + (NSString**) frameworkClasses; #endif /* Strip off the name of the executable */ - path = [toolName stringByDeletingLastPathComponent]; + path = [GSPrivateExecutablePath() stringByDeletingLastPathComponent]; /* We now need to chop off the extra subdirectories, the library combo and the target directory if they exist. The executable @@ -3453,7 +3453,7 @@ + (AAsset *) assetForPath: (NSString *)path withMode: (int)mode { NSString *resourcePath = [_mainBundle resourcePath]; - if ([path hasPrefix: resourcePath] + if (resourcePath && [path hasPrefix: resourcePath] && [path length] > [resourcePath length]) { NSString *assetPath;