Fix crash on forced disconnect
authorunc0rr
Wed, 15 Dec 2010 21:48:54 +0300
changeset 4536 11bd8c7e4118
parent 4535 301df2c84b97
child 4537 f95f7218531a
Fix crash on forced disconnect
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Wed Dec 15 21:40:16 2010 +0300
+++ b/QTfrontend/hwform.cpp	Wed Dec 15 21:48:54 2010 +0300
@@ -897,8 +897,9 @@
 {
     if(pnetserver) return; // we have server - let it care of all things
     if (hwnet) {
-        hwnet->deleteLater();
+        HWNewNet * tmp = hwnet;
         hwnet = 0;
+        tmp->deleteLater();
         QMessageBox::warning(this, QMessageBox::tr("Network"),
                 QMessageBox::tr("Connection to server is lost"));