]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetspecialchar.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetspecialchar.C
index 61fc798a7ea6e775cbf70b05fc2d856062cd78c0..21f59106a29935e38e8cf177e07f95c90d631294 100644 (file)
@@ -26,6 +26,7 @@
 
 using std::ostream;
 using std::max;
+using std::auto_ptr;
 
 
 InsetSpecialChar::InsetSpecialChar(Kind k)
@@ -239,9 +240,9 @@ int InsetSpecialChar::docbook(Buffer const *, ostream & os, bool) const
 }
 
 
-InsetBase * InsetSpecialChar::clone() const
+auto_ptr<InsetBase> InsetSpecialChar::clone() const
 {
-       return new InsetSpecialChar(kind_);
+       return auto_ptr<InsetBase>(new InsetSpecialChar(kind_));
 }