[vlc-commits] macosx: Do not release VLCDialogWindow instance

Marvin Scholz git at videolan.org
Fri Feb 16 16:13:33 CET 2018


vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Feb 16 16:07:51 2018 +0100| [5e79a6bd3e107b28f3cfd1677c5142dce6ec9b2b] | committer: Marvin Scholz

macosx: Do not release VLCDialogWindow instance

Releasing it at this point causes a crash later.
Given that we do a CFBridgingRetain, not releasing it here possibly
reintroduces a memory leak, and should be investigated at some point.

Fix #19772
CD f26743f6-af62-451f-99d1-02a3e02b98a7

(cherry picked from commit c657a089095404fc93cd57b846304d9199fc1ac4)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5e79a6bd3e107b28f3cfd1677c5142dce6ec9b2b
---

 modules/gui/macosx/VLCExtensionsDialogProvider.m | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/VLCExtensionsDialogProvider.m b/modules/gui/macosx/VLCExtensionsDialogProvider.m
index a96b439007..977440a909 100644
--- a/modules/gui/macosx/VLCExtensionsDialogProvider.m
+++ b/modules/gui/macosx/VLCExtensionsDialogProvider.m
@@ -468,7 +468,10 @@ static void extensionDialogCallback(extension_dialog_t *p_ext_dialog,
 {
     assert(p_dialog);
 
-    VLCDialogWindow *dialogWindow = CFBridgingRelease(p_dialog->p_sys_intf);
+    /* FIXME: Creating the dialog, we CFBridgingRetain p_sys_intf but we can't
+     *        just CFBridgingRelease it here, as that causes a crash.
+     */
+    VLCDialogWindow *dialogWindow = (__bridge VLCDialogWindow*)p_dialog->p_sys_intf;
     if (!dialogWindow) {
         msg_Warn(getIntf(), "dialog window not found");
         return VLC_EGENERIC;



More information about the vlc-commits mailing list