diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 3bc598ad..cb0f10ca 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -2425,3 +2425,12 @@ void mainWindowImpl::blinkingStartButtonAnimationAction() { } pushButton_break->setPalette(tempPalette); } + +void mainWindowImpl::closeEvent(QCloseEvent *event) { + + mySession->terminateNetworkClient(); + if (myServerGuiInterface.get()) myServerGuiInterface->getSession().terminateNetworkServer(); + + event->accept(); + +} \ No newline at end of file diff --git a/src/gui/qt/mainwindow/mainwindowimpl.h b/src/gui/qt/mainwindow/mainwindowimpl.h index 3e72fc65..44227c5a 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.h +++ b/src/gui/qt/mainwindow/mainwindowimpl.h @@ -199,6 +199,8 @@ public slots: void networkError(int, int); void networkStart(int, int, int, int); + void closeEvent(QCloseEvent*); + private: boost::shared_ptr myServerGuiInterface;