add null pointer check (#1106)
This commit is contained in:
parent
14df388f6c
commit
51c8ee5bc1
1 changed files with 2 additions and 1 deletions
|
@ -338,7 +338,8 @@ bool tipc::startSlaveServer(QString srvName, QString cmdline) {
|
|||
// the *MAIN* thread
|
||||
// in *this process* exits. So, if this is not the main thread, we must move
|
||||
// the socket there.
|
||||
if (QThread::currentThread() != QCoreApplication::instance()->thread())
|
||||
if (QCoreApplication::instance() &&
|
||||
QThread::currentThread() != QCoreApplication::instance()->thread())
|
||||
dummySock->moveToThread(QCoreApplication::instance()->thread());
|
||||
|
||||
// If a connection error takes place, release the dummy socket.
|
||||
|
|
Loading…
Reference in a new issue