summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-07 16:16:34 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-07 16:16:34 +0200
commit0b14bf99532fc4b70dec81d848038e70b22694da (patch)
tree6b3410bf937a6f6eefebf3fcede6b1e8ef260b4c /examples
parentb035546f9976a984474a45bb61aa7767f88a7bd3 (diff)
downloadsink-0b14bf99532fc4b70dec81d848038e70b22694da.tar.gz
sink-0b14bf99532fc4b70dec81d848038e70b22694da.zip
Verify the iterator is valid before trying to dereference it.
Diffstat (limited to 'examples')
-rw-r--r--examples/caldavresource/tests/caldavtest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/caldavresource/tests/caldavtest.cpp b/examples/caldavresource/tests/caldavtest.cpp
index b9886fa..32dad91 100644
--- a/examples/caldavresource/tests/caldavtest.cpp
+++ b/examples/caldavresource/tests/caldavtest.cpp
@@ -285,6 +285,7 @@ private slots:
285 std::find_if(itemList.begin(), itemList.end(), [this](const KDAV2::DavItem &item) { 285 std::find_if(itemList.begin(), itemList.end(), [this](const KDAV2::DavItem &item) {
286 return item.url().url().path().endsWith(addedEventUid); 286 return item.url().url().path().endsWith(addedEventUid);
287 }); 287 });
288 QVERIFY(hollowDavItemIt != itemList.end());
288 289
289 auto davitem = ([this, &collection, &hollowDavItemIt]() -> KDAV2::DavItem { 290 auto davitem = ([this, &collection, &hollowDavItemIt]() -> KDAV2::DavItem {
290 QString itemUrl = collection.url().url().toEncoded() + addedEventUid; 291 QString itemUrl = collection.url().url().toEncoded() + addedEventUid;