diff --git a/src/net/maildir/maildirMessage.cpp b/src/net/maildir/maildirMessage.cpp index 326a3ced..acba0c3a 100644 --- a/src/net/maildir/maildirMessage.cpp +++ b/src/net/maildir/maildirMessage.cpp @@ -313,9 +313,9 @@ void maildirMessage::extractPart(ref p, utility::outputStream& os, utility::progressListener* progress, const int start, const int length, const bool peek) const { - const maildirPart& mp = dynamic_cast (p); + ref mp = p.dynamicCast (); - extractImpl(os, progress, mp.getBodyParsedOffset(), mp.getBodyParsedLength(), + extractImpl(os, progress, mp->getBodyParsedOffset(), mp->getBodyParsedLength(), start, length, peek); }