Fix Evmenu infinite loop on empty key. Resolves #1769.
This commit is contained in:
parent
64cd982592
commit
f0d98e1a5b
1 changed files with 4 additions and 0 deletions
|
|
@ -1008,6 +1008,10 @@ class EvMenu(object):
|
||||||
|
|
||||||
ncols = (_MAX_TEXT_WIDTH // table_width_max) + 1 # number of ncols
|
ncols = (_MAX_TEXT_WIDTH // table_width_max) + 1 # number of ncols
|
||||||
|
|
||||||
|
if ncols <= 0:
|
||||||
|
# no visible option at all
|
||||||
|
return ""
|
||||||
|
|
||||||
# get the amount of rows needed (start with 4 rows)
|
# get the amount of rows needed (start with 4 rows)
|
||||||
nrows = 4
|
nrows = 4
|
||||||
while nrows * ncols < nlist:
|
while nrows * ncols < nlist:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue