]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetspace.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetspace.C
index f17e374418bf1f1b4d5d211ad48813c48f93c208..eb333e649cec19e6353d3192973caaa65049ebb2 100644 (file)
@@ -28,6 +28,7 @@
 
 using std::ostream;
 using std::max;
+using std::auto_ptr;
 
 
 InsetSpace::InsetSpace()
@@ -251,9 +252,9 @@ int InsetSpace::docbook(Buffer const *, ostream & os, bool) const
 }
 
 
-InsetBase * InsetSpace::clone() const
+auto_ptr<InsetBase>  InsetSpace::clone() const
 {
-       return new InsetSpace(kind_);
+       return auto_ptr<InsetBase>(new InsetSpace(kind_));
 }