diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-07 16:16:34 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-07 16:16:34 +0200 |
commit | 0b14bf99532fc4b70dec81d848038e70b22694da (patch) | |
tree | 6b3410bf937a6f6eefebf3fcede6b1e8ef260b4c /examples | |
parent | b035546f9976a984474a45bb61aa7767f88a7bd3 (diff) | |
download | sink-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.cpp | 1 |
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; |