diff --git a/modules/gui/macosx/library/VLCLibraryWindow.m b/modules/gui/macosx/library/VLCLibraryWindow.m index 23c5ad1a359056fd6c0ab7855f7b21a475ffda58..bce525998a1ee9d9de8bd4dfdfc75cb1850582bc 100644 --- a/modules/gui/macosx/library/VLCLibraryWindow.m +++ b/modules/gui/macosx/library/VLCLibraryWindow.m @@ -431,15 +431,13 @@ static void addShadow(NSImageView *__unsafe_unretained imageView) const VLCLibrarySegmentType segmentType = self.librarySegmentType; [self.toolbarDelegate layoutForSegment:segmentType]; - VLCLibraryMediaSourceViewController * const lvc = - [[VLCLibraryMediaSourceViewController alloc] initWithLibraryWindow:self]; if (segmentType == VLCLibraryBrowseSegment) { - [lvc presentBrowseView]; + [self.libraryMediaSourceViewController presentBrowseView]; } else if (segmentType == VLCLibraryStreamsSegment) { - [lvc presentStreamsView]; + [self.libraryMediaSourceViewController presentStreamsView]; } - _librarySegmentViewController = lvc; + _librarySegmentViewController = self.libraryMediaSourceViewController; } - (void)showGroupsLibrary