Permalink
Browse files

change splitObjects to safely handle proxy objects

  • Loading branch information...
1 parent b72aa1d commit dd123189ba8928156e55ffc0e70cb38d2baaae75 @skurfer committed Nov 29, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 Quicksilver/Code-QuickStepCore/QSObject.m
@@ -223,15 +223,15 @@ + (id)objectByMergingObjects:(NSArray *)objects withObject:(QSObject *)object {
}
- (NSArray *)splitObjects {
-
- if ([self count] == 1) {
- return [NSArray arrayWithObject:self];
+ QSObject *object = [self isProxyObject] ? (QSObject *)[self resolvedObject] : self;
+ if ([object count] == 1) {
+ return [NSArray arrayWithObject:object];
}
- NSArray *splitObjects = [self objectForCache:kQSObjectComponents];
+ NSArray *splitObjects = [object objectForCache:kQSObjectComponents];
if (!splitObjects) {
- splitObjects = [self children];
+ splitObjects = [object children];
}
return splitObjects;
}

0 comments on commit dd12318

Please sign in to comment.