mirror of https://code.videolan.org/videolan/vlc
macosx: Fix information window not being shown at all when currently playing input item is nil, but without crashing
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
This commit is contained in:
parent
ed30c1263e
commit
95522489c2
|
@ -1536,11 +1536,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
|||
_infoWindowController.mainMenuInstance = YES;
|
||||
}
|
||||
|
||||
VLCInputItem * const currentInputItem = _playlistController.currentlyPlayingInputItem;
|
||||
if (currentInputItem == nil) {
|
||||
return;
|
||||
}
|
||||
_infoWindowController.representedInputItem = currentInputItem;
|
||||
_infoWindowController.representedInputItem = _playlistController.currentlyPlayingInputItem;
|
||||
[_infoWindowController toggleWindow:sender];
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ _##field##TextField.delegate = self
|
|||
|
||||
- (void)setRepresentedInputItem:(VLCInputItem *)representedInputItem
|
||||
{
|
||||
_representedInputItems = @[representedInputItem];
|
||||
_representedInputItems = representedInputItem == nil ? @[] : @[representedInputItem];
|
||||
_artwork = [VLCLibraryImageCache thumbnailForInputItem:representedInputItem];
|
||||
[self updateRepresentation];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue