[vlc-commits] macosx: Do not try to release a nil object

David Fuhrmann git at videolan.org
Sun Jun 10 14:06:21 CEST 2018


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Jun  9 19:54:18 2018 +0200| [9c43e2ab1ce2031f61dfe5d77cb12e1208ee9ccd] | committer: Felix Paul Kühne

macosx: Do not try to release a nil object

(cherry picked from commit 2192f658cb94e72a938dc43614c0a9332e4ff1d7)

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

 modules/gui/macosx/VLCExtensionsDialogProvider.m | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCExtensionsDialogProvider.m b/modules/gui/macosx/VLCExtensionsDialogProvider.m
index f85cf139f0..f721b708ff 100644
--- a/modules/gui/macosx/VLCExtensionsDialogProvider.m
+++ b/modules/gui/macosx/VLCExtensionsDialogProvider.m
@@ -419,8 +419,10 @@ static void extensionDialogCallback(extension_dialog_t *p_ext_dialog,
             /* Explicitily release here, as we do not have transfered ownership to ARC,
              * given that not in all cases we want to destroy the widget.
              */
-            CFRelease(widget->p_sys_intf);
-            widget->p_sys_intf = NULL;
+            if (widget->p_sys_intf) {
+                CFRelease(widget->p_sys_intf);
+                widget->p_sys_intf = NULL;
+            }
         }
     }
     FOREACH_END()



More information about the vlc-commits mailing list