]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetoptarg.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetoptarg.C
index 7a082361026aa987d261465aea5f9593c08ae2e7..3abdebc170df65901786c30145a2ece0223595fe 100644 (file)
@@ -26,6 +26,8 @@
 using std::ostream;
 using std::vector;
 using std::pair;
+using std::auto_ptr;
+
 
 InsetOptArg::InsetOptArg(BufferParams const & ins)
        : InsetCollapsable(ins, true)
@@ -47,9 +49,9 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
 }
 
 
-Inset * InsetOptArg::clone(Buffer const &) const
+auto_ptr<InsetBase> InsetOptArg::clone() const
 {
-       return new InsetOptArg(*this);
+       return auto_ptr<InsetBase>(new InsetOptArg(*this));
 }