Commit a44da88b authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

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

parent 0397c9b6
......@@ -100,6 +100,7 @@
input_item_t * p_item;
BOOL b_awakeFromNib;
BOOL b_stats;
}
@property (readonly) input_item_t * item;
......
......@@ -137,13 +137,14 @@ static VLCInfo *_o_sharedInstance = nil;
- (void)initPanel
{
BOOL b_stats = config_GetInt(VLCIntf, "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];
[self initMediaPanelStats];
[o_info_window makeKeyAndOrderFront: self];
}
......@@ -270,7 +271,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