[vlc-commits] macosx: video effects: Protect for potentially uninitialized variable

David Fuhrmann git at videolan.org
Wed Dec 13 23:51:20 CET 2017


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Dec 10 19:30:32 2017 +0100| [7a2ebf25c90fab4e86d8df52a0a87af0ed204285] | committer: David Fuhrmann

macosx: video effects: Protect for potentially uninitialized variable

(cherry picked from commit 14d1b6be4dce81ede52d56fd021f438ab3c24aba)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

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

 modules/gui/macosx/VLCVideoEffectsWindowController.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m
index 7eb59cc697..98ded961f1 100644
--- a/modules/gui/macosx/VLCVideoEffectsWindowController.m
+++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m
@@ -909,8 +909,7 @@
 
 - (IBAction)adjustSliderChanged:(id)sender
 {
-    char const *psz_property;
-
+    char const *psz_property = nil;
     if (sender == _adjustBrightnessSlider)
         psz_property = "brightness";
     else if (sender == _adjustContrastSlider)
@@ -921,6 +920,8 @@
         psz_property = "hue";
     else if (sender == _adjustSaturationSlider)
         psz_property = "saturation";
+    assert(psz_property);
+
     [[VLCCoreInteraction sharedInstance] setVideoFilterProperty: psz_property forFilter: "adjust" withValue: getWidgetFloatValue(sender)];
 
     if (sender == _adjustHueSlider)



More information about the vlc-commits mailing list