Commit c1fa23c0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fix crash when displaying the Media Information panel with disabled local stats

(cherry picked from commit a44da88b77a1fe47f5e49c11106261d8b50315f8)

Conflicts:
	modules/gui/macosx/playlistinfo.m
parent 77c6906f
......@@ -100,6 +100,7 @@
input_item_t * p_item;
BOOL b_awakeFromNib;
BOOL b_stats;
}
- (void)initPanel;
......
......@@ -140,14 +140,14 @@ static VLCInfo *_o_sharedInstance = nil;
- (void)initPanel
{
BOOL b_stats = config_GetInt(VLCIntf, "stats");
if( !b_stats )
{
b_stats = config_GetInt(VLCIntf, "stats");
if( !b_stats ) {
if( [o_tab_view numberOfTabViewItems] > 2 )
[o_tab_view removeTabViewItem: [o_tab_view tabViewItemAtIndex: 2]];
}
else
[self initMediaPanelStats];
[o_info_window makeKeyAndOrderFront: self];
}
......@@ -280,7 +280,7 @@ static VLCInfo *_o_sharedInstance = nil;
- (void)updateStatistics
{
if (!b_awakeFromNib)
if (!b_awakeFromNib || !b_stats)
return;
if ([o_info_window isVisible])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment