diff --git a/sources/appl/Gui/MainWindows.cpp b/sources/appl/Gui/MainWindows.cpp index db2474c..6456877 100644 --- a/sources/appl/Gui/MainWindows.cpp +++ b/sources/appl/Gui/MainWindows.cpp @@ -282,7 +282,7 @@ void MainWindows::onReceiveMessage(const ewol::object::Message& _msg) { APPL_VERBOSE("Receive Event from the main windows: " << _msg ); // open file Section ... if (_msg.getMessage() == ednMsgGuiOpen) { - ewol::widget::FileChooser* tmpWidget = new ewol::widget::FileChooser(); + ewol::object::Shared tmpWidget = ewol::object::makeShared(new ewol::widget::FileChooser()); if (tmpWidget == nullptr) { APPL_ERROR("Can not open File chooser !!! "); return; @@ -515,4 +515,7 @@ void MainWindows::onObjectRemove(const ewol::object::Shared& _remo if (m_widgetLabelFileName == _removeObject) { m_widgetLabelFileName = nullptr; } + if (m_bufferManager == _removeObject) { + m_bufferManager = nullptr; + } }