diff options
-rw-r--r-- | src/network/kernel/qhostinfo_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index bbf4cc36d1..fa6529bdfd 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -105,12 +105,12 @@ public Q_SLOTS: inline void emitResultsReady(const QHostInfo &info) { if (slotObj) { - // we used to have a context object, but it's already destroyed - if (withContextObject && !receiver) - return; - QHostInfo copy = info; - void *args[2] = { 0, reinterpret_cast<void *>(©) }; - slotObj->call(const_cast<QObject*>(receiver.data()), args); + // we either didn't have a context object, or it's still alive + if (!withContextObject || receiver) { + QHostInfo copy = info; + void *args[2] = { 0, reinterpret_cast<void *>(©) }; + slotObj->call(const_cast<QObject*>(receiver.data()), args); + } slotObj->destroyIfLastRef(); } else { emit resultsReady(info); |