macosx: Do not set nil input item as represented input item for information window

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
This commit is contained in:
Claudio Cambra 2024-04-17 20:47:51 +08:00 committed by Jean-Baptiste Kempf
parent c9afd0cfa3
commit ed30c1263e
1 changed files with 6 additions and 1 deletions

View File

@ -1535,7 +1535,12 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
_infoWindowController = [[VLCInformationWindowController alloc] init];
_infoWindowController.mainMenuInstance = YES;
}
_infoWindowController.representedInputItem = _playlistController.currentlyPlayingInputItem;
VLCInputItem * const currentInputItem = _playlistController.currentlyPlayingInputItem;
if (currentInputItem == nil) {
return;
}
_infoWindowController.representedInputItem = currentInputItem;
[_infoWindowController toggleWindow:sender];
}