summaryrefslogtreecommitdiffabout
path: root/kabc/vcard/VCardv.cpp
authorulf69 <ulf69>2004-09-28 21:32:21 (UTC)
committer ulf69 <ulf69>2004-09-28 21:32:21 (UTC)
commit551a0bb353c7ffff4b307956a7cc7a023bf36863 (patch) (side-by-side diff)
tree99a2f40f6c510f8ea2f482d481f2051bd9f2227d /kabc/vcard/VCardv.cpp
parent57c00cdf5002e90603e0e1cfb5ac5c2c8bf19fe7 (diff)
downloadkdepimpi-551a0bb353c7ffff4b307956a7cc7a023bf36863.zip
kdepimpi-551a0bb353c7ffff4b307956a7cc7a023bf36863.tar.gz
kdepimpi-551a0bb353c7ffff4b307956a7cc7a023bf36863.tar.bz2
fixed a potential crash when loading adresses from any adressbook file.
Diffstat (limited to 'kabc/vcard/VCardv.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcard/VCardv.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp
index 391a69e..d19a004 100644
--- a/kabc/vcard/VCardv.cpp
+++ b/kabc/vcard/VCardv.cpp
@@ -188,13 +188,17 @@ VCard::_parse()
QStrListIterator it2(refolded);
for (; it2.current(); ++it2) {
-
- vDebug("New contentline using \"" + QCString(it2.current()) + "\"");
+ vDebug("New contentline using \"" + QCString(it2.current()) + "\"");
ContentLine * cl = new ContentLine(it2.current());
cl->parse();
-
- contentLineList_.append(cl);
+ if (cl->value() == 0)
+ {
+ qDebug("Content line could not be parsed. Discarded: %s" + QCString(it2.current()));
+ delete cl;
+ }
+ else
+ contentLineList_.append(cl);
}
///////////////////////////////////////////////////////////////