Commit 9488135e authored by Romain Goyet's avatar Romain Goyet Committed by Felix Paul Kühne

Safer state machine for settings initialization

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 13bf28e9
......@@ -144,11 +144,14 @@
- (IBAction)showSettings:(id)sender
{
if (!self.settingsViewController)
self.settingsViewController = [[IASKAppSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
if (!self.settingsController)
if (!self.settingsController) {
self.settingsController = [[VLCSettingsController alloc] init];
}
if (!self.settingsViewController) {
self.settingsViewController = [[IASKAppSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
self.settingsController.viewController = self.settingsViewController;
}
self.settingsViewController.modalPresentationStyle = UIModalPresentationFormSheet;
self.settingsViewController.delegate = self.settingsController;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment