Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d4be06be by Claudio Cambra at 2024-12-17T15:01:17+00:00
macosx: Prevent crash from assigning nil string to controls bar detail label

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
91864bc5 by Claudio Cambra at 2024-12-17T15:01:17+00:00
macosx: Safeguard against nil string set on controls bar playingItemDisplayField

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -


1 changed file:

- modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.m


Changes:

=====================================
modules/gui/macosx/windows/controlsbar/VLCControlsBarCommon.m
=====================================
@@ -482,12 +482,12 @@
     VLCMediaLibraryMediaItem * const mediaItem =
         [VLCMediaLibraryMediaItem 
mediaItemForURL:_playerController.URLOfCurrentMediaItem];
 
-    self.playingItemDisplayField.stringValue = inputItem ? inputItem.name : 
_NS("No current item");
+    self.playingItemDisplayField.stringValue = inputItem.name ?: _NS("No 
current item");
     self.detailLabel.hidden =
         mediaItem == nil ||
         [mediaItem.primaryDetailString isEqualToString:@""] ||
         [mediaItem.primaryDetailString 
isEqualToString:mediaItem.durationString];
-    self.detailLabel.stringValue = mediaItem.primaryDetailString;
+    self.detailLabel.stringValue = mediaItem.primaryDetailString ?: @"";
 
     NSURL * const artworkURL = inputItem.artworkURL;
     NSImage * const placeholderImage = [NSImage imageNamed:@"noart"];



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/eaa118fe468e2ce7d9f7f18bea9567dfa85a2277...91864bc5e96f1fac9c97d603fe6f97b74851e197

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/eaa118fe468e2ce7d9f7f18bea9567dfa85a2277...91864bc5e96f1fac9c97d603fe6f97b74851e197
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to