Skip to content

Commit 17e2c88

Browse files
committed
Catch error that occurs if the opening app quits while the script is running.
1 parent aa51812 commit 17e2c88

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/JJApplicationDelegate.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ repeat while (count menu bars) = 0\n\
109109
click menu item %@ of menu 1 of menu bar item 3 of menu bar 1\n\
110110
end tell\n\
111111
if (restoreold) then\n\
112+
try\n\
112113
set frontmost of oldapp to true\n\
114+
end try\n\
113115
end if\n\
114116
end tell";
115117
NSString* menuItem = [@PRODUCT_NAME isEqualToString:@"PrivateWindow"] ? @"2" : @"1";

0 commit comments

Comments
 (0)