Fixed potential NPE in toString, there's no guarantee that getValue() is always not null.

(transplanted from 225e3d761e2706d6c95c0cd4a1e269cea528392e)
This commit is contained in:
Heng Sin Low 2011-08-17 01:17:00 +08:00
parent 70f93229ad
commit 36f5c84ded
1 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public class ListItem extends org.zkoss.zul.Listitem
@Override
public String toString() {
return getValue().toString();
return getValue() != null ? getValue().toString() : "";
}
}