]> Some of my projects - localmylist.git/commitdiff
Rest m_instance in ~MyList in case it is called directly
authorAPTX <redacted>
Sat, 7 Feb 2026 08:21:37 +0000 (17:21 +0900)
committerAPTX <redacted>
Sat, 7 Mar 2026 03:43:55 +0000 (12:43 +0900)
localmylist/mylist.cpp

index 521e3f7317b3d7cb88e209b1a066ccef45972395..27e5b6c8c746b8dafad04a9d2267d5e92c4a017c 100644 (file)
@@ -47,6 +47,7 @@ MyList::~MyList()
        {
                QMetaObject::invokeMethod(workThread, "quit");
        }
+       m_instance = nullptr;
 }
 
 QString MyList::hostName() const
@@ -475,7 +476,7 @@ void MyList::destroy()
        if (!m_instance)
                return;
        delete m_instance;
-       m_instance = 0;
+       m_instance = nullptr;
 }
 
 bool MyList::isUdpClientAvailable()