Commit d514f8f7 authored by David Fuhrmann's avatar David Fuhrmann Committed by Jean-Baptiste Kempf

macosx: avoid out of bound exception which can occur while reading from log array

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
(cherry picked from commit 2d81b923ef635a3336f127aa1530f4d3a1d5e18f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 54d68818
......@@ -1863,7 +1863,17 @@ unsigned int CocoaKeyToVLC( unichar i_key )
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
return [o_msg_arr objectAtIndex: rowIndex];
NSMutableAttributedString *result = NULL;
[o_msg_lock lock];
if( rowIndex < [o_msg_arr count] )
result = [o_msg_arr objectAtIndex: rowIndex];
[o_msg_lock unlock];
if( result != NULL )
return result;
else
return @"";
}
- (void)processReceivedlibvlcMessage:(const msg_item_t *) item ofType: (int)i_type withStr: (char *)str
......
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