From 5ddd75cc52d24d264e6efa54c951551e33e6dd1b Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: May 18 2016 11:45:12 +0000 Subject: fix magnet tool crash (#324) --- diff --git a/toonz/sources/common/tvrender/tstrokedeformations.cpp b/toonz/sources/common/tvrender/tstrokedeformations.cpp index 8cee607..0a36b5a 100644 --- a/toonz/sources/common/tvrender/tstrokedeformations.cpp +++ b/toonz/sources/common/tvrender/tstrokedeformations.cpp @@ -200,7 +200,6 @@ TStrokePointDeformation::TStrokePointDeformation(const TPointD &vect, double radius) : m_imp(new Imp(vect, center, radius)) { - delete m_imp; } //----------------------------------------------------------------------------- diff --git a/toonz/sources/include/tstrokedeformations.h b/toonz/sources/include/tstrokedeformations.h index b074f13..ed1401b 100644 --- a/toonz/sources/include/tstrokedeformations.h +++ b/toonz/sources/include/tstrokedeformations.h @@ -5,6 +5,7 @@ // #include "tstrokeutil.h" #include "tgeometry.h" +#include #undef DVAPI #undef DVVAR @@ -80,7 +81,7 @@ class DVAPI TStrokePointDeformation : public TStrokeDeformation { protected: struct Imp; - Imp *m_imp; + std::unique_ptr m_imp; public: /*!