When a menu is popped up but contains no items, the listData is null
(rather than empty). Special!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@850 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2009-08-18 23:08:20 +00:00
parent 707ebe5e5a
commit 502701a32b
@@ -38,6 +38,7 @@ public class CommandMenuItemRenderer extends MenuItemRenderer
override protected function commitProperties () :void
{
super.commitProperties();
// Note: a menu with no items will have a null listData
if ((icon == null) && (listData is CommandListData)) {
icon = CommandListData(listData).iconObject;
@@ -46,7 +47,7 @@ public class CommandMenuItemRenderer extends MenuItemRenderer
}
}
if (label.visible) {
if (label.visible && (listData != null)) {
var dataDescriptor :IMenuDataDescriptor = Menu(listData.owner).dataDescriptor;
var typeVal :String = dataDescriptor.getType(data);
if (typeVal == "title") {