mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 12:10:42 +00:00
Fixed: framework image names without @framework would cause nib2cib to fail.
I wasn't properly handling the case where _resourcePathForName would be called with a nil framework.
This commit is contained in:
1 parent
9bde63923c
commit
eb859d42a4
1 file changed
+6
-3
@@ -52,7 +52,10 @@ var FILE = require("file");
|
||||
else if (!info.resourceDirectory)
|
||||
[CPException raise:Nib2CibException format:@"The framework “%@” specified by the image “%@@%@” has no Resources directory.", framework, aName, framework];
|
||||
|
||||
return { path:[self _resourcePathForName:aName inDirectory:info.resourceDirectory], framework:framework };
|
||||
var path = [self _resourcePathForName:aName inDirectory:info.resourceDirectory];
|
||||
|
||||
if (path)
|
||||
return { path:path, framework:framework };
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -79,7 +82,7 @@ var FILE = require("file");
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
[CPException raise:Nib2CibException format:@"The image “%@” cannot be found.", aName];
|
||||
}
|
||||
|
||||
- (CPString)_resourcePathForName:(CPString)aName inDirectory:(CPString)directory
|
||||
@@ -107,7 +110,7 @@ var FILE = require("file");
|
||||
}
|
||||
}
|
||||
|
||||
[CPException raise:Nib2CibException format:@"The image “%@” cannot be found in %@.", aName, directory];
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in new issue
Block a user