X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fvcard%2Fvcard.cpp;h=fb34ab4bab8439c9e9aaee0e49873e6acd6ee354;hp=bc9cd81509706a4a8661cdc23dff3526e7a24818;hb=2031be04c0036b44c40c473a07fdd31e898b2a11;hpb=a17840c69f3b828ef139f0c642993d8283b80b63 diff --git a/source/vcard/vcard.cpp b/source/vcard/vcard.cpp index bc9cd81..fb34ab4 100644 --- a/source/vcard/vcard.cpp +++ b/source/vcard/vcard.cpp @@ -190,6 +190,15 @@ vCardName vCard::GetName(){ vCardName NameData; ArrayvCardOutData NameArray = this->GetByPartial(wxT("N")); //wxString NameDataGet = NameArray.PropValues[0]; + + if (NameArray.PropValues.Count() == 0) + { + // Use FN if there is no N values set. + wxString fullName = this->Get(wxT("FN")); + NameData.Forename = fullName; + return NameData; + } + wxString NameDataGet = NameArray.PropValues[0]; std::map SplitPoints; std::map SplitLength;