Bugfix.
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:
@@ -38,6 +38,7 @@ public class CommandMenuItemRenderer extends MenuItemRenderer
|
|||||||
override protected function commitProperties () :void
|
override protected function commitProperties () :void
|
||||||
{
|
{
|
||||||
super.commitProperties();
|
super.commitProperties();
|
||||||
|
// Note: a menu with no items will have a null listData
|
||||||
|
|
||||||
if ((icon == null) && (listData is CommandListData)) {
|
if ((icon == null) && (listData is CommandListData)) {
|
||||||
icon = CommandListData(listData).iconObject;
|
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 dataDescriptor :IMenuDataDescriptor = Menu(listData.owner).dataDescriptor;
|
||||||
var typeVal :String = dataDescriptor.getType(data);
|
var typeVal :String = dataDescriptor.getType(data);
|
||||||
if (typeVal == "title") {
|
if (typeVal == "title") {
|
||||||
|
|||||||
Reference in New Issue
Block a user