aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTreeNode.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-03-04 19:11:12 +0000
committerstuconnolly <stuart02@gmail.com>2012-03-04 19:11:12 +0000
commite2fbd102c251671d42c33c5e748ceb06c4926ceb (patch)
treeed6e8faed7a1f0195fcf0d409d094bc96fa64ff3 /Source/SPTreeNode.m
parentc9ac1028d6b430de61b376257beee1d5747c7783 (diff)
downloadsequelpro-e2fbd102c251671d42c33c5e748ceb06c4926ceb.tar.gz
sequelpro-e2fbd102c251671d42c33c5e748ceb06c4926ceb.tar.bz2
sequelpro-e2fbd102c251671d42c33c5e748ceb06c4926ceb.zip
Would help if I committed the right file.
Diffstat (limited to 'Source/SPTreeNode.m')
-rw-r--r--Source/SPTreeNode.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPTreeNode.m b/Source/SPTreeNode.m
index d93db01b..f787816a 100644
--- a/Source/SPTreeNode.m
+++ b/Source/SPTreeNode.m
@@ -236,14 +236,18 @@ static NSString *SPTreeNodeIsGroupKey = @"SPTreeNodeIsGroup";
for (SPTreeNode *node in [self childNodes])
{
- [children addObject:[node dictionaryRepresentation]];
+ NSDictionary *representation = [node dictionaryRepresentation];
+
+ if (representation) {
+ [children addObject:representation];
+ }
}
dictionary = [NSMutableDictionary dictionary];
NSString *name = (![self parentNode]) ? NSLocalizedString(@"Favorites", @"favorites label") : [object nodeName];
- [dictionary setObject:(name) ? name : @"" forKey:SPFavoritesGroupNameKey];
+ [dictionary setObject:name ? name : @"" forKey:SPFavoritesGroupNameKey];
[dictionary setObject:children forKey:SPFavoriteChildrenKey];
}