diff options
Diffstat (limited to '')
-rw-r--r-- | src/bodyPart.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp index 6903adb2..6d686f9b 100644 --- a/src/bodyPart.cpp +++ b/src/bodyPart.cpp @@ -33,7 +33,7 @@ bodyPart::bodyPart() m_body(vmime::create <body>()), m_parent(NULL) { - m_body->setParentPart(this); + m_body->setParentPart(thisRef().dynamicCast <bodyPart>()); } @@ -121,9 +121,15 @@ ref <body> bodyPart::getBody() } -weak_ref <bodyPart> bodyPart::getParentPart() const +ref <bodyPart> bodyPart::getParentPart() { - return (m_parent); + return m_parent.acquire(); +} + + +ref <const bodyPart> bodyPart::getParentPart() const +{ + return m_parent.acquire(); } |