Commit 2d81b923 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

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>
parent 822e3f18
......@@ -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