aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Martins <[email protected]>2015-10-19 23:01:23 +0100
committerSergio Martins <[email protected]>2015-10-19 23:01:23 +0100
commitdd04e51c129e2a5971b3737e93d87cdc5116bef6 (patch)
treedff7b7148cc4902c452b2c337d131d4b7b603726
parent4e110a3dee1cb354430781446d4fc73e934615d7 (diff)
Don't detach container
-rw-r--r--src/kmime_content.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kmime_content.cpp b/src/kmime_content.cpp
index b9e8a68..91fc150 100644
--- a/src/kmime_content.cpp
+++ b/src/kmime_content.cpp
@@ -768,7 +768,7 @@ Content *KMime::Content::content(const ContentIndex &index) const
ContentIndex idx = index;
unsigned int i = idx.pop() - 1; // one-based -> zero-based index
if (i < (unsigned int)d_ptr->contents().size()) {
- return d_ptr->contents()[i]->content(idx);
+ return d_ptr->contents().at(i)->content(idx);
} else {
return 0;
}
@@ -784,7 +784,7 @@ ContentIndex KMime::Content::indexForContent(Content *content) const
}
// not found, we need to search recursively
for (int i = 0; i < d_ptr->contents().size(); ++i) {
- ContentIndex ci = d_ptr->contents()[i]->indexForContent(content);
+ ContentIndex ci = d_ptr->contents().at(i)->indexForContent(content);
if (ci.isValid()) {
// found it
ci.push(i + 1); // zero-based -> one-based index