[vlc-commits] macosx: Fix potential crash in media information panel

David Fuhrmann git at videolan.org
Sun Feb 7 17:26:30 CET 2016


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Feb  7 17:25:47 2016 +0100| [f6e00a5bcf6450cf762ba150e285dff0b6a470cf] | committer: David Fuhrmann

macosx: Fix potential crash in media information panel

This is changes in git as well already.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=f6e00a5bcf6450cf762ba150e285dff0b6a470cf
---

 modules/gui/macosx/playlistinfo.m |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index 9e94701..aa54d1e 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -471,7 +471,7 @@ error:
             vlc_mutex_lock(&p_item->lock);
             o_children = [[NSMutableArray alloc] initWithCapacity: p_item->i_categories];
             for (int i = 0 ; i < p_item->i_categories ; i++) {
-                NSString * name = [NSString stringWithUTF8String:p_item->pp_categories[i]->psz_name];
+                NSString * name = toNSStr(p_item->pp_categories[i]->psz_name);
                 VLCInfoTreeItem * item = [[VLCInfoTreeItem alloc] initWithName:name value:@"" ID:i parent:self];
                 [item autorelease];
                 [o_children addObject:item];
@@ -483,8 +483,8 @@ error:
             info_category_t * cat = p_item->pp_categories[i_object_id];
             o_children = [[NSMutableArray alloc] initWithCapacity: cat->i_infos];
             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 ? : ""];
+                NSString * name = toNSStr(cat->pp_infos[i]->psz_name);
+                NSString * value = toNSStr(cat->pp_infos[i]->psz_value);
                 VLCInfoTreeItem * item = [[VLCInfoTreeItem alloc] initWithName:name value:value ID:i parent:self];
                 [item autorelease];
                 [o_children addObject:item];



More information about the vlc-commits mailing list