[vlc-devel] [PATCH] macosx: Fix more weak NSWindow references

Marvin Scholz epirat07 at gmail.com
Fri Sep 9 15:58:23 CEST 2016


Weak NSWindow references are not allowed on 10.7,
and will lead to runtime crashes.
---
 modules/gui/macosx/VLCConvertAndSaveWindowController.h | 4 ++--
 modules/gui/macosx/VLCOpenWindowController.h           | 2 +-
 modules/gui/macosx/simple_prefs.h                      | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/VLCConvertAndSaveWindowController.h b/modules/gui/macosx/VLCConvertAndSaveWindowController.h
index 1d24728..d3dbc6f 100644
--- a/modules/gui/macosx/VLCConvertAndSaveWindowController.h
+++ b/modules/gui/macosx/VLCConvertAndSaveWindowController.h
@@ -62,7 +62,7 @@
 @property (weak) IBOutlet NSButton *streamDestinationButton;
 
 // customize panel
- at property (weak) IBOutlet NSWindow *customizePanel;
+ at property ()     IBOutlet NSWindow *customizePanel;
 @property (weak) IBOutlet NSButton *customizeNewProfileButton;
 @property (weak) IBOutlet NSButton *customizeCancelButton;
 @property (weak) IBOutlet NSButton *customizeOkButton;
@@ -107,7 +107,7 @@
 @property (weak) IBOutlet NSPopUpButton *customizeSubsPopup;
 
 // stream panel
- at property (weak) IBOutlet NSWindow *streamPanel;
+ at property ()     IBOutlet NSWindow *streamPanel;
 @property (weak) IBOutlet NSTextField *streamDestinationLabel;
 @property (weak) IBOutlet NSTextField *streamTypeLabel;
 @property (weak) IBOutlet NSTextField *streamAddressLabel;
diff --git a/modules/gui/macosx/VLCOpenWindowController.h b/modules/gui/macosx/VLCOpenWindowController.h
index 4c24375..69ad114 100644
--- a/modules/gui/macosx/VLCOpenWindowController.h
+++ b/modules/gui/macosx/VLCOpenWindowController.h
@@ -116,7 +116,7 @@
 @property (readwrite, weak) IBOutlet NSButton *netOpenUDPButton;
 @property (readwrite, weak) IBOutlet NSButton *netUDPCancelButton;
 @property (readwrite, weak) IBOutlet NSButton *netUDPOKButton;
- at property (readwrite, weak) IBOutlet NSWindow *netUDPPanel;
+ at property (readwrite)       IBOutlet NSWindow *netUDPPanel;
 @property (readwrite, weak) IBOutlet NSTextField *netUDPPortTextField;
 @property (readwrite, weak) IBOutlet NSTextField *netUDPPortLabel;
 @property (readwrite, weak) IBOutlet NSStepper *netUDPPortStepper;
diff --git a/modules/gui/macosx/simple_prefs.h b/modules/gui/macosx/simple_prefs.h
index c6fdeb5..893a90f 100644
--- a/modules/gui/macosx/simple_prefs.h
+++ b/modules/gui/macosx/simple_prefs.h
@@ -52,11 +52,11 @@
 @property (readwrite, weak) IBOutlet NSButtonCell *audio_autosavevol_noButtonCell;
 
 // hotkeys pane
+ at property (readwrite)       IBOutlet NSWindow *hotkeys_change_win;
 @property (readwrite, weak) IBOutlet NSButton *hotkeys_changeButton;
 @property (readwrite, weak) IBOutlet NSTextField *hotkeys_changeLabel;
 @property (readwrite, weak) IBOutlet NSTextField *hotkeys_change_keysLabel;
 @property (readwrite, weak) IBOutlet NSTextField *hotkeys_change_takenLabel;
- at property (readwrite, weak) IBOutlet NSWindow *hotkeys_change_win;
 @property (readwrite, weak) IBOutlet NSButton *hotkeys_change_cancelButton;
 @property (readwrite, weak) IBOutlet NSButton *hotkeys_change_okButton;
 @property (readwrite, weak) IBOutlet NSButton *hotkeys_clearButton;
@@ -202,7 +202,7 @@
 @property (readwrite, weak) IBOutlet NSPopUpButton *urlhandler_sftpPopup;
 @property (readwrite, weak) IBOutlet NSPopUpButton *urlhandler_smbPopup;
 @property (readwrite, weak) IBOutlet NSPopUpButton *urlhandler_udpPopup;
- at property (readwrite, weak) IBOutlet NSWindow *urlhandler_win;
+ at property (readwrite)       IBOutlet NSWindow *urlhandler_win;
 
 /* toolbar */
 - (NSToolbarItem *)toolbar:(NSToolbar *)o_toolbar
-- 
2.7.4 (Apple Git-66)



More information about the vlc-devel mailing list