Commit 2c0fe5ed authored by Marvin Scholz's avatar Marvin Scholz

macOS: Do not form weak reference to NSWindowController

Use __unsafe_unretained instead of __weak, as we need to support 10.7
and it is not supported to form a weak reference to some types,
including NSWindowController, resulting in a runtime crash.
parent 40f745de
......@@ -683,7 +683,8 @@
[_textfieldPanel setCancelButtonString:_NS("Cancel")];
[_textfieldPanel setOkButtonString:_NS("Save")];
__weak typeof(self) _self = self;
// TODO: Change to weak, when dropping 10.7 support
__unsafe_unretained typeof(self) _self = self;
[_textfieldPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSString *resultingText) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
......@@ -750,7 +751,8 @@
[_popupPanel setCancelButtonString:_NS("Cancel")];
[_popupPanel setPopupButtonContent:[[NSUserDefaults standardUserDefaults] objectForKey:@"VideoEffectProfileNames"]];
__weak typeof(self) _self = self;
// TODO: Change to weak, when dropping 10.7 support
__unsafe_unretained typeof(self) _self = self;
[_popupPanel runModalForWindow:self.window completionHandler:^(NSInteger returnCode, NSInteger selectedIndex) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
......
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