Skip to content

Commit

Permalink
Close window if presented not as a sheet
Browse files Browse the repository at this point in the history
Issue #276
  • Loading branch information
eofster committed Sep 19, 2016
1 parent e4644ff commit 9920a7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Telephone/AccountSetupController.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ - (instancetype)init {
}

- (IBAction)closeSheet:(id)sender {
[self.window.sheetParent endSheet:self.window];
if (self.window.sheetParent) {
[self.window.sheetParent endSheet:self.window];
} else {
[self.window orderOut:sender];
}
}

- (IBAction)addAccount:(id)sender {
Expand Down

0 comments on commit 9920a7c

Please sign in to comment.