From: Felix Paul Kühne Date: Thu, 9 Nov 2006 13:32:45 +0000 (+0000) Subject: * forward-port [17568] X-Git-Tag: 0.9.0-test0~9612 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=1d524052e63bc299fe710f5d6ee97d0235da3a4b;p=vlc * forward-port [17568] --- diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index f0b374b47f..5066bde075 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -256,11 +256,15 @@ NSLog( @"expandable" ); if( [[o_tc identifier] isEqualToString:@"1"] ) { - o_value = [NSString stringWithUTF8String: - p_item->p_input->psz_name]; - if( o_value == NULL ) - o_value = [NSString stringWithCString: - p_item->p_input->psz_name]; + /* sanity check to prevent the NSString class from crashing */ + if( p_item->input.psz_name != NULL ) + { + o_value = [NSString stringWithUTF8String: + p_item->input.psz_name]; + if( o_value == NULL ) + o_value = [NSString stringWithCString: + p_item->input.psz_name]; + } } else if( [[o_tc identifier] isEqualToString:@"2"] && p_item->p_input->p_meta && p_item->p_input->p_meta->psz_artist && *p_item->p_input->p_meta->psz_artist )