mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-23 23:15:52 +00:00
Fixed: crash in CPCib.j due to previous refactoring refs #c5b250236fa662e3da04e442f4414f95d64d9308
This commit is contained in:
1 parent
66b1d297ba
commit
5f7922d7fd
1 file changed
+13
-2
+13
-2
@@ -94,7 +94,18 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";
|
||||
|
||||
- (id)initWithCibNamed:(CPString)aName bundle:(CPBundle)aBundle
|
||||
{
|
||||
return [self initWithCibNamed:aName bundle:aBundle loadDelegate:nil];
|
||||
if (![aName hasSuffix:@".cib"])
|
||||
aName = [aName stringByAppendingString:@".cib"];
|
||||
|
||||
// If aBundle is nil, use mainBundle, but ONLY for searching for the nib, not for resources later.
|
||||
var bundle = aBundle || [CPBundle mainBundle];
|
||||
|
||||
self = [self initWithContentsOfURL:[bundle _cibPathForResource:aName]];
|
||||
|
||||
if (self)
|
||||
_bundle = aBundle;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCibNamed:(CPString)aName bundle:(CPBundle)aBundle loadDelegate:(id)aLoadDelegate
|
||||
@@ -102,9 +113,9 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";
|
||||
if (![aName hasSuffix:@".cib"])
|
||||
aName = [aName stringByAppendingString:@".cib"];
|
||||
|
||||
// If aBundle is nil, use mainBundle, but ONLY for searching for the nib, not for resources later.
|
||||
var bundle = aBundle || [CPBundle mainBundle];
|
||||
|
||||
// If aBundle is nil, use mainBundle, but ONLY for searching for the nib, not for resources later.
|
||||
self = [self initWithContentsOfURL:[bundle _cibPathForResource:aName] loadDelegate:aLoadDelegate];
|
||||
|
||||
if (self)
|
||||
|
||||
Reference in new issue
Block a user