Kaynağa Gözat

playback: fix runtime exception on iOS 7

Note that it now crashes some place else deep in AppKit

(cherry picked from commit 6f3fd117428fe90978f7ba03af2beb6725bc2357)
Felix Paul Kühne 7 yıl önce
ebeveyn
işleme
25a8e4624d
1 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 4 2
      Sources/VLCMovieViewControlPanelView.m

+ 4 - 2
Sources/VLCMovieViewControlPanelView.m

@@ -156,8 +156,10 @@ static const CGFloat maxCompactWidth = 420.0;
 
 - (void)setupConstraints:(BOOL)compactMode
 {
-    [self removeConstraints:_constraints];
-    
+    if (_constraints != nil) {
+        [self removeConstraints:_constraints];
+    }
+
     NSDictionary *viewsDict = @{@"speed" : self.playbackSpeedButton,
                                 @"track" : self.trackSwitcherButton,
                                 @"playback" : self.playbackControls,