Commit 5fd7ef49 authored by Juho Vähä-Herttua's avatar Juho Vähä-Herttua Committed by Ilkka Ollakka

OSX: fix a crash when the option-list finished by 0, like the new x264_nal_hrd

(cherry picked from commit 64188f7809f44b9b74f94e07bbd0381b398a6afa)
Signed-off-by: default avatarIlkka Ollakka <ileoo@iki.fi>
parent 84037ee1
...@@ -1074,7 +1074,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1074,7 +1074,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
-2, 0, o_textfieldTooltip ) -2, 0, o_textfieldTooltip )
[o_combo setAutoresizingMask:NSViewWidthSizable ]; [o_combo setAutoresizingMask:NSViewWidthSizable ];
for( i_index = 0; i_index < p_item->i_list; i_index++ ) for( i_index = 0; i_index < p_item->i_list; i_index++ )
if( p_item->value.psz && if( p_item->value.psz && p_item->ppsz_list[i_index] &&
!strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) ) !strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) )
[o_combo selectItemAtIndex: i_index]; [o_combo selectItemAtIndex: i_index];
[self addSubview: o_combo]; [self addSubview: o_combo];
...@@ -1118,7 +1118,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1118,7 +1118,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name ); char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
for( i_index = 0; i_index < p_item->i_list; i_index++ ) for( i_index = 0; i_index < p_item->i_list; i_index++ )
if( psz_value && if( psz_value && p_item->ppsz_list[i_index] &&
!strcmp( psz_value, p_item->ppsz_list[i_index] ) ) !strcmp( psz_value, p_item->ppsz_list[i_index] ) )
[o_combo selectItemAtIndex: i_index]; [o_combo selectItemAtIndex: i_index];
......
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