1
0
Fork 0

OverlaySelector: don't choke if there are no options

This commit is contained in:
mfranz 2009-01-11 02:42:33 +00:00
parent c6614ce178
commit e96322b351

View file

@ -352,7 +352,9 @@ var OverlaySelector = {
},
rescan: func {
me.data = [];
foreach (var file; directory(me.dir)) {
var files = directory(me.dir);
if (size(files)) {
foreach (var file; files) {
if (substr(file, -4) != ".xml")
continue;
var n = io.read_properties(me.dir ~ file);
@ -364,6 +366,7 @@ var OverlaySelector = {
}
me.data = sort(me.data, func(a, b) num(a[1]) == nil or num(b[1]) == nil
? cmp(a[1], b[1]) : a[1] - b[1]);
}
me.list.removeChildren("value");
forindex (var i; me.data)