mirror of https://github.com/davatorium/rofi.git
Fix #251 : Don't iterate over nil list.
This commit is contained in:
parent
0a07456120
commit
46f9073f7e
|
@ -1040,9 +1040,10 @@ MenuReturn menu ( Switcher *sw, char **input, char *prompt, unsigned int *select
|
||||||
state.lines_not_ascii = g_malloc0_n ( state.num_lines, sizeof ( int ) );
|
state.lines_not_ascii = g_malloc0_n ( state.num_lines, sizeof ( int ) );
|
||||||
|
|
||||||
// find out which lines contain non-ascii codepoints, so we can be faster in some cases.
|
// find out which lines contain non-ascii codepoints, so we can be faster in some cases.
|
||||||
|
if ( state.lines != NULL ) {
|
||||||
for ( unsigned int line = 0; state.lines[line]; line++ ) {
|
for ( unsigned int line = 0; state.lines[line]; line++ ) {
|
||||||
state.lines_not_ascii[line] = is_not_ascii ( state.lines[line] );
|
state.lines_not_ascii[line] = is_not_ascii ( state.lines[line] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( next_pos ) {
|
if ( next_pos ) {
|
||||||
|
|
Loading…
Reference in New Issue