DisplayNameMixinAbstract handle null properly

This commit is contained in:
BuildTools authored and Olof Larsson committed 2016-02-25 22:55:51 +01:00
1 parent 6c1bd25ae9
commit e74a45bd2b
1 file changed
+3 -1
@@ -6,6 +6,8 @@ public abstract class DisplayNameMixinAbstract implements DisplayNameMixin
{
public Mson getDisplayNameMson(Object senderObject, Object watcherObject)
{
return Mson.fromParsedMessage(this.getDisplayName(senderObject, watcherObject));
String displayName = this.getDisplayName(senderObject, watcherObject);
if (displayName == null) return null;
return Mson.fromParsedMessage(displayName);
}
}