X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=ConfigsController.m;h=a9f3f3ed855f8cb33fde224efe7de148a67a32a6;hp=969398515b4a5d235e41d48da9dca73dd2035c14;hb=44a44209d4ce26fb30102014d7040975aea51f93;hpb=32ca88087708a8b1f7e65ecbea6c5fd6690431d3 diff --git a/ConfigsController.m b/ConfigsController.m index 9693985..a9f3f3e 100644 --- a/ConfigsController.m +++ b/ConfigsController.m @@ -77,6 +77,7 @@ [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged]; [tableView reloadData]; + [self save]; } -(void)tableViewSelectionDidChange:(NSNotification *)notify { @@ -132,9 +133,12 @@ for (unsigned i = 0; i < storedConfigs.count; ++i) { NSDictionary *entries = storedConfigs[i][@"entries"]; Config *config = newConfigs[i]; - for (id key in entries) - config.entries[key] = [Target targetDeserialize:entries[key] - withConfigs:newConfigs]; + for (id key in entries) { + Target *target = [Target targetDeserialize:entries[key] + withConfigs:newConfigs]; + if (target) + config.entries[key] = target; + } } if (newConfigs.count) {