diff options
Diffstat (limited to 'forms/source/richtext')
-rw-r--r-- | forms/source/richtext/richtextengine.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index 4712a61fbf13..1a1cb0cb6250 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -35,7 +35,7 @@ #include <algorithm> #include <functional> - +#include <boost/scoped_ptr.hpp> namespace frm { @@ -85,14 +85,13 @@ namespace frm RichTextEngine* pClone( NULL ); { SolarMutexGuard aGuard; - EditTextObject* pMyText = CreateTextObject(); + boost::scoped_ptr<EditTextObject> pMyText(CreateTextObject()); OSL_ENSURE( pMyText, "RichTextEngine::Clone: CreateTextObject returned nonsense!" ); pClone = Create(); if ( pMyText ) pClone->SetText( *pMyText ); - delete pMyText; } return pClone; |