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

macosx: add missing sanity check

parent 184723ed
......@@ -498,8 +498,12 @@ error:
if (i_object_id == -1) {
vlc_mutex_lock(&p_item->lock);
for (int i = 0 ; i < p_item->i_categories ; i++) {
NSString * name = [NSString stringWithUTF8String:p_item->pp_categories[i]->psz_name];
VLCInfoTreeItem * item = [[VLCInfoTreeItem alloc]
NSString *name;
if (p_item->pp_categories[i]->psz_name)
name = [NSString stringWithUTF8String:p_item->pp_categories[i]->psz_name];
else
name = @"";
VLCInfoTreeItem *item = [[VLCInfoTreeItem alloc]
initWithName:name
value:@""
ID:i
......@@ -514,9 +518,17 @@ error:
vlc_mutex_lock(&p_item->lock);
info_category_t * cat = p_item->pp_categories[i_object_id];
for (int i = 0 ; i < cat->i_infos ; i++) {
NSString * name = [NSString stringWithUTF8String:cat->pp_infos[i]->psz_name];
NSString * value = [NSString stringWithUTF8String:cat->pp_infos[i]->psz_value ? : ""];
VLCInfoTreeItem * item = [[VLCInfoTreeItem alloc]
NSString *name;
NSString *value;
if (cat->pp_infos[i]->psz_name != NULL)
name = [NSString stringWithUTF8String:cat->pp_infos[i]->psz_name];
else
name = @"";
if (cat->pp_infos[i]->psz_value != NULL)
value = [NSString stringWithUTF8String:cat->pp_infos[i]->psz_value];
else
value = @"";
VLCInfoTreeItem *item = [[VLCInfoTreeItem alloc]
initWithName:name
value:value
ID:i
......
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