diff options
author | rowanbeentje <rowan@beent.je> | 2009-12-07 22:45:09 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-12-07 22:45:09 +0000 |
commit | a2c7f0a33464fd3558f328bc975b8f1fc3ca2dfe (patch) | |
tree | e6903d139f5f4d0f832636be3f9131cac53e4cc6 /Source/CustomQuery.m | |
parent | 73df7b3d9a91bb57319a6fa44e5c01656a4443aa (diff) | |
download | sequelpro-a2c7f0a33464fd3558f328bc975b8f1fc3ca2dfe.tar.gz sequelpro-a2c7f0a33464fd3558f328bc975b8f1fc3ca2dfe.tar.bz2 sequelpro-a2c7f0a33464fd3558f328bc975b8f1fc3ca2dfe.zip |
- Additional error checking when reading in query favorites to ensure a malformed favorite does not break application launch
- Move favorites update routine to a later revision check to upgrade any query favorites created by dual use of 0.9.6 and nightlies
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r-- | Source/CustomQuery.m | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index e620aba5..a1922f8f 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -2650,6 +2650,7 @@ [menu addItem:headerMenuItem]; [headerMenuItem release]; for (NSDictionary *favorite in [prefs objectForKey:SPQueryFavorites]) { + if (![favorite isKindOfClass:[NSDictionary class]] || ![favorite objectForKey:@"name"]) continue; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[NSString stringWithString:[favorite objectForKey:@"name"]] action:NULL keyEquivalent:@""]; [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]]; [item setIndentationLevel:1]; |