diff --git a/source/org/jivesoftware/smackx/muc/RoomInfo.java b/source/org/jivesoftware/smackx/muc/RoomInfo.java index 7a632cfa0..f97f5443e 100644 --- a/source/org/jivesoftware/smackx/muc/RoomInfo.java +++ b/source/org/jivesoftware/smackx/muc/RoomInfo.java @@ -90,10 +90,10 @@ public class RoomInfo { Form form = Form.getFormFrom(info); if (form != null) { FormField descField = form.getField("muc#roominfo_description"); - this.description = descField == null ? "" : descField.getValues().next(); + this.description = ( descField == null || !(descField.getValues().hasNext()) )? "" : descField.getValues().next(); FormField subjField = form.getField("muc#roominfo_subject"); - this.subject = subjField == null ? "" : subjField.getValues().next(); + this.subject = ( subjField == null || !(subjField.getValues().hasNext()) ) ? "" : subjField.getValues().next(); FormField occCountField = form.getField("muc#roominfo_occupants"); this.occupantsCount = occCountField == null ? -1 : Integer.parseInt(occCountField.getValues()