vlc | branch: master | David Fuhrmann <[email protected]> | Thu Dec 
27 11:34:14 2012 +0100| [25f233cf1a280675a6fa24093185d6950ed81dea] | committer: 
David Fuhrmann

macosx: fix rare crash when changing video effects settings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=25f233cf1a280675a6fa24093185d6950ed81dea
---

 modules/gui/macosx/VideoEffects.m |   25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/modules/gui/macosx/VideoEffects.m 
b/modules/gui/macosx/VideoEffects.m
index 48acd9c..47d81a8 100644
--- a/modules/gui/macosx/VideoEffects.m
+++ b/modules/gui/macosx/VideoEffects.m
@@ -536,20 +536,21 @@ static VLCVideoEffects *_o_sharedInstance = nil;
         vlc_object_release(p_vout);
 
     vlc_object_t *p_filter = vlc_object_find_name(pl_Get(p_intf), psz_filter);
-    int i_type;
-    i_type = var_Type(p_filter, psz_name);
-    if (i_type == 0)
-        i_type = config_GetType(p_intf, psz_name);
-
-    if (!(i_type & VLC_VAR_ISCOMMAND)) {
-        msg_Warn(p_intf, "Brute-restarting filter '%s', because the last 
changed option isn't a command", psz_name);
-        [self setVideoFilter: psz_filter on: NO];
-        [self setVideoFilter: psz_filter on: YES];
-    } else
-        msg_Dbg(p_intf, "restart not needed");
+    if (p_filter) {
+        int i_type;
+        i_type = var_Type(p_filter, psz_name);
+        if (i_type == 0)
+            i_type = config_GetType(p_intf, psz_name);
+
+        if (!(i_type & VLC_VAR_ISCOMMAND)) {
+            msg_Warn(p_intf, "Brute-restarting filter '%s', because the last 
changed option isn't a command", psz_name);
+            [self setVideoFilter: psz_filter on: NO];
+            [self setVideoFilter: psz_filter on: YES];
+        } else
+            msg_Dbg(p_intf, "restart not needed");
 
-    if (p_filter)
         vlc_object_release(p_filter);
+    }
 }
 
 - (void)setVideoFilterProperty: (char *)psz_name forFilter: (char *)psz_filter 
integer: (int)i_value

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to