Fix crash when adding new attachment

This commit is contained in:
David Rowe 2016-08-10 10:41:16 +12:00
parent 093d80e102
commit afe76c69d2

View file

@ -1638,7 +1638,9 @@ void AvatarData::setAttachmentsVariant(const QVariantList& variant) {
for (const auto& attachmentVar : variant) {
AttachmentData attachment;
attachment.fromVariant(attachmentVar);
newAttachments.append(attachment);
if (!attachment.modelURL.isEmpty()) {
newAttachments.append(attachment);
}
}
setAttachmentData(newAttachments);
}