diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 1b26b3dc2..db1b5dd10 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -153,8 +153,7 @@ Main::Main(QWidget *parent) : m_webThree.reset(new WebThreeDirect(string("AlethZero/v") + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM), getDataDir() + "/AlethZero", false, {"eth", "shh"})); - // w3stubserver, on dealloc, deletes m_qwebConnector - m_qwebConnector = new QWebThreeConnector(); // owned by WebThreeStubServer + m_qwebConnector.reset(new QWebThreeConnector()); m_server.reset(new OurWebThreeStubServer(*m_qwebConnector, *web3(), keysAsVector(m_myKeys))); connect(&*m_server, SIGNAL(onNewId(QString)), SLOT(addNewId(QString))); m_server->setIdentities(keysAsVector(owned())); diff --git a/alethzero/MainWin.h b/alethzero/MainWin.h index 50b9df413..2582aa23d 100644 --- a/alethzero/MainWin.h +++ b/alethzero/MainWin.h @@ -256,7 +256,7 @@ private: QString m_logHistory; bool m_logChanged = true; - QWebThreeConnector* m_qwebConnector; + std::unique_ptr m_qwebConnector; std::unique_ptr m_server; QWebThree* m_qweb = nullptr; };