1
0
Fork 0

fix rarely occurring bug: if the node isn't initialized, then cap is nil

and can't be compared with a scalar, but only with nil itself
This commit is contained in:
mfranz 2006-05-12 06:54:16 +00:00
parent bb8b06e294
commit af04d04e79

View file

@ -422,7 +422,7 @@ showWeightDialog = func {
cap = t.getNode("capacity-gal_us", 1).getValue();
# Hack, to ignore the "ghost" tanks created by the C++ code.
if(cap < 1) { continue; }
if(cap == nil or cap < 1) { continue; }
title = tcell(fuelTable, "text", i+1, 0);
title.set("label", tname);
@ -546,7 +546,7 @@ showHelpDialog = func {
return;
}
dialog[name] = gui.Widget.new();
dialog[name] = Widget.new();
dialog[name].set("layout", "vbox");
dialog[name].set("default-padding", 0);
dialog[name].set("name", name);